使用@PostConstruct标注的方法。
实现InitializingBean接口后的回调方法afterPropertiesSet()方法。
通过init-method或default-init-method指定的方法。
使用@PreDestroy标注的方法。
实现DisposableBean接口后的回调方法destroy()方法。
通过destroy-method或default-destroy-method指定的方法。
使用@PostConstruct标注的方法。
实现InitializingBean接口后的回调方法afterPropertiesSet()方法。
通过init-method或default-init-method指定的方法。
使用@PreDestroy标注的方法。
实现DisposableBean接口后的回调方法destroy()方法。
通过destroy-method或default-destroy-method指定的方法。