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