springboot原理

-springboot的核心是自动装配spring

  • 自动装备的核心实现是EnableAutoConfiguration这个注解。这注解的核心是Import注解以及import中的selector类。spring在生成完beandefination的时候再实例化对象以前会调用系统得BeanFactoryPostProcessor链。其中ConfigurationClassPostProcessor会解析import注解,完成beandefination的动态加载。
相关文章
相关标签/搜索