Spring常用注解
Java · 2 篇笔记
- 2.32 Autowired原理historical
1. 类继承图 2. 原理分析 1. spring容器refresh的时候有两个关键步骤,registerBeanPostProcessors和finishBeanFactoryInitialization 2. registerBeanPostProcessors会向spring容器注入Autow
- 2.47 Spring常用注解historical
注解作用 @Configuration 相当于之前的applicationContext.xml,就是一个配置文件 @ComponentScan 配置扫描包,如果有@Controller,@Service,@Repositiry,@Component修饰的,则把它加入ioc容器中 @Bean 配合@