spring注解为bean指定InitMethod和DestroyMethod

/** * 指定组建的init方法和destroy的几种方法 * 1:在配置类中 @Bean(initMethod = "init",destroyMethod = "destory")注解指定 * 2:实现InitializingBean重写其afterPropertiesSet方法,重写DisposableBean重写destroy方法 * 3:利用ja
相关文章
相关标签/搜索