javax.annotation.PostConstruct类的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(228)

本文整理了Java中javax.annotation.PostConstruct类的一些代码示例,展示了PostConstruct类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PostConstruct类的具体详情如下:
包路径:javax.annotation.PostConstruct
类名称:PostConstruct

PostConstruct介绍

暂无

代码示例

代码示例来源:origin: ctripcorp/apollo

@PostConstruct
private void initialize() {
 logger.info(
   "SampleRedisConfig initialized - expireSeconds: {}, clusterNodes: {}, commandTimeout: {}, someMap: {}, someList: {}",
   expireSeconds, clusterNodes, commandTimeout, someMap, someList);
}

代码示例来源:origin: prestodb/presto

@PostConstruct
public void start()
{
  if (started.compareAndSet(false, true)) {
    configExecutor.scheduleWithFixedDelay(this::load, 1, 1, TimeUnit.SECONDS);
  }
}

代码示例来源:origin: prestodb/presto

@PostConstruct
public void start()
{
  if (started.compareAndSet(false, true)) {
    refreshExecutor.scheduleWithFixedDelay(this::refreshAndStartQueries, 1, 1, TimeUnit.MILLISECONDS);
  }
}

代码示例来源:origin: ctripcorp/apollo

@PostConstruct
public void init() {
 authorities = new ArrayList<>();
 authorities.add(new SimpleGrantedAuthority("ROLE_user"));
}

代码示例来源:origin: spring-projects/spring-framework

@PostConstruct
public void init() {
  initialized = true;
}

代码示例来源:origin: EnterpriseQualityCoding/FizzBuzzEnterpriseEdition

@PostConstruct
public void init() {
  final ApplicationContext applicationContext = applicationContextHolder.getApplicationContext();
  this.integerDivider = applicationContext.getBean(IntegerDivider.class);
}

代码示例来源:origin: EnterpriseQualityCoding/FizzBuzzEnterpriseEdition

@PostConstruct
public void init() {
  final ApplicationContext applicationContext = applicationContextHolder.getApplicationContext();
  this.integerDivider = applicationContext.getBean(IntegerDivider.class);
}

代码示例来源:origin: ctripcorp/apollo

@PostConstruct
private void postConstruct() {
 restTemplate = restTemplateFactory.getObject();
}

代码示例来源:origin: ctripcorp/apollo

@PostConstruct
private void init() {
 restTemplate = restTemplateFactory.getObject();
}

代码示例来源:origin: ctripcorp/apollo

@PostConstruct
public void init() {
 executorService = Executors.newSingleThreadExecutor(ApolloThreadFactory.create("ConfigPublishNotify", true));
}

代码示例来源:origin: prestodb/presto

@PostConstruct
public synchronized void start()
{
  checkState(!closed, "TaskExecutor is closed");
  for (int i = 0; i < runnerThreads; i++) {
    addRunnerThread();
  }
}

代码示例来源:origin: spring-projects/spring-framework

@PostConstruct
  public void validate() {
    Assert.notNull(provider, "No ServiceBeanProvider injected");
  }
}

代码示例来源:origin: spring-projects/spring-framework

@PostConstruct
  public void init() {
    this.publisher.publishEvent("earlyEvent");
  }
}

代码示例来源:origin: spring-projects/spring-framework

@PostConstruct
private void init() {
  if (this.initCalled) {
    throw new IllegalStateException("Already called");
  }
  this.initCalled = true;
}

代码示例来源:origin: spring-projects/spring-framework

@Override
@PostConstruct
public void afterPropertiesSet() throws Exception {
  this.initMethods.add("afterPropertiesSet");
}

代码示例来源:origin: spring-projects/spring-framework

@PostConstruct
@Override
public void afterPropertiesSet() throws Exception {
  this.initMethods.add("@PostConstruct.afterPropertiesSet");
}

代码示例来源:origin: spring-projects/spring-framework

@PostConstruct
private void init() {
  if (this.init3Called) {
    throw new IllegalStateException("Already called");
  }
  this.init3Called = true;
}

代码示例来源:origin: spring-projects/spring-framework

@PostConstruct
private void init() {
  if (this.initCalled) {
    throw new IllegalStateException("Init already called");
  }
  this.initCalled = true;
}

代码示例来源:origin: spring-projects/spring-framework

@PostConstruct
private void init() {
  if (this.initCalled) {
    throw new IllegalStateException("Init already called");
  }
  this.initCalled = true;
}

代码示例来源:origin: spring-projects/spring-framework

@PostConstruct
  public void validate() {
    Assert.notNull(provider, "No ServiceBeanProvider injected");
  }
}

相关文章

PostConstruct类方法