如何开启基于注解的自动装配?
发布时间:2022-11-16 17:27:05
发布人:qyf

要使用@Autowired,需要注册AutowiredAnnotationBeanPostProcessor,可以有以下两种方式来实现:
1. 引入配置文件中的下引入
2. 在bean配置文件中直接引入AutowiredAnnotationBeanPostProcessor