初始化Bean的先后顺序为
- BeanPostProcessor的postProcessBeforeInitialization方法
- 注解了 @PostConstruct 的方法
- InitializingBean的afterPropertiesSet方法
- bean的指定的初始化方法: init-method
- BeanPostProcessor的postProcessAftrInitialization方法
InitializingBean、BeanPostProcessor、init-method、@PostConstruct执行先后顺序_postconstruct执行顺序_彧卿丶的博客-CSDN博客