spring4笔记----spring生命周期属性

init-method : 指定bean的初始化方法-spring容器会在bean的依赖关系注入完成后调用该方法

destroy-method :指定bean销毁之前的方法-spring容器将会在销毁该bean之前调用该方法


@PostConstruct :bean的初始化方法

@PreDestroy  :bean销毁之前的方法

原文地址:https://www.cnblogs.com/tk55/p/6507642.html