随笔分类 - spring
摘要:1.BeanFactoryPostProcessor的调用时机 refresh()的invokeBeanFactoryPostProcessors(beanFactory); → PostProcessorRegistrationDelegate.invokeBeanFactoryPostProce
阅读全文
摘要:#ServletWebServerApplicationContext.java 创建一个容器,在run()方法中被调用。比如调用onRefresh(),把ServletWebServerApplicationContext注册到ServletContext属性中,并调用ServletContext
阅读全文
摘要:WebApplicationContext rootContext =WebApplicationContextUtils.getWebApplicationContext(getServletContext()); ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE 业务
阅读全文
摘要:@Import(AutoConfigurationImportSelector.class) 只要是 @Import + DeferredImportSelector实现类都可以注入到dbregistry(可以仿照springboot的AutoConfigurationImportSelector的
阅读全文
摘要:@ConfigurationProperties填充对象属性,它默认是从application.yml或application.properties上读,需要作为一个bean,所以还要加@Component或在配置类上加@Bean。 如果要指定配置文件就要加@PropertySource @Prop
阅读全文
浙公网安备 33010602011771号