Spring Bean创建
- 定义注解@PostConstruct的方法
- afterPropertiesSet()方法定义在
InitializingBeancallback 接口 - 定义在xml文件中的init()方法
Spring Bean销毁
- 定义注解@PreDestroy的方法
- destroy()方法定义在
DisposableBeancallback接口 - 定义在xml文件中的destroy()方法
Spring Bean创建
InitializingBean callback 接口
Spring Bean销毁
DisposableBean callback接口