0
点赞
收藏
分享

微信扫一扫

Spring6.0官方文档示例:(27)bean的多个生命周期方法共存时的执行顺序


初始化:
1)@PostConstruct注解
2)afterPropertiesSet(实现InitializingBean接口而定义的)
3)init-method
销毁:
1)@PreDestroy注解
2)destroy(实现DisposableBean接口而定义的)
3)自定义的destroy方法


举报

相关推荐

0 条评论