org.springframework.context.support.ClassPathXmlApplicationContext.getBeanDefinitionCount()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(131)

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

ClassPathXmlApplicationContext.getBeanDefinitionCount介绍

暂无

代码示例

代码示例来源:origin: org.dspace/dspace-services-impl

log.info("Spring Service Manager started up in "+totalTime+" ms with "+applicationContext.getBeanDefinitionCount()+" services...");

代码示例来源:origin: org.dspace/dspace-services

log.info("Spring Service Manager started up in "+totalTime+" ms with "+applicationContext.getBeanDefinitionCount()+" services...");

代码示例来源:origin: DSpace/DSpace

@Override
public void startup() {
  long startTime = System.currentTimeMillis();
  // get all spring config paths
  String[] allPaths = getSpringPaths(testMode, configPaths, configurationService);
  applicationContext = new ClassPathXmlApplicationContext(allPaths, false);
  // Make sure that the spring files from the config directoy can override the spring files from our jars
  applicationContext.setAllowBeanDefinitionOverriding(true);
  applicationContext.setAllowCircularReferences(true);
  //applicationContext.registerShutdownHook(); // this interferes with the kernel shutdown hook
  // add the config interceptors (partially done in the xml)
  applicationContext
    .addBeanFactoryPostProcessor(new DSpaceBeanFactoryPostProcessor(parent, configurationService, testMode));
  applicationContext.refresh();
  if (developmentMode) {
    log.warn("Spring Service Manager is running in developmentMode, services will be loaded on demand only");
    // TODO find a way to set this sucker to super duper lazy mode? it is currently not actually doing it
  } else {
    applicationContext.getBeanFactory().preInstantiateSingletons();
    applicationContext.getBeanFactory().freezeConfiguration();
  }
  long totalTime = System.currentTimeMillis() - startTime;
  log.info("Spring Service Manager started up in " + totalTime + " ms with " + applicationContext
    .getBeanDefinitionCount() + " services...");
}

相关文章

微信公众号

最新文章

更多