Spring @PostConstruce 和 @PreDestroy 实例化\销毁 bean 时

@PostConstruct

public void init(){...}

 

@PreDestroy

public void destroy(){...}

 

<!-- 公用注解 bean 后处理器,处理 @PostConstruct 和 @PreDestroy 注解 -->
<bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor"/>

 

posted @ 2013-12-15 19:52  聆听自由  阅读(564)  评论(0编辑  收藏  举报