当bean实现了InitializingBean,DisposableBean 两个接口的时候,顺序如下:
Bean在实例化的过程中:Constructor > @Autowired >@PostConstruct >InitializingBean > init-method
Bean在销毁的过程中:@PreDestroy > DisposableBean > destroy-method
当bean实现了InitializingBean,DisposableBean 两个接口的时候,顺序如下:
Bean在实例化的过程中:Constructor > @Autowired >@PostConstruct >InitializingBean > init-method
Bean在销毁的过程中:@PreDestroy > DisposableBean > destroy-method