當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
xml文件: #模糊查詢匹配 <select id="getListTaskName" resultType="String"> SELECT TASK_NAME FROM