初始化方法的调用顺序:
1.@PostConstruct修饰的方法
2.InitializingBean接口的afterPropertiesSet()方法
3.在xml中配置的init()方法
Destroy方法的调用顺序:
1.@PreDestroy修饰的方法
2.DisposableBean接口的destroy()方法
3.在xml中定义的destroy()方法
1.@PostConstruct修饰的方法
2.InitializingBean接口的afterPropertiesSet()方法
3.在xml中配置的init()方法
Destroy方法的调用顺序:
1.@PreDestroy修饰的方法
2.DisposableBean接口的destroy()方法
3.在xml中定义的destroy()方法