InitializingBean

源碼 InitializingBean接口用於對bean進行初始化配置,實現方式是通過afterPropertiesSet方法,凡是繼承該接口的類,在初始化bean的時候會執行afterPropertiesSet方法。 測試 結果 這說明在spring初始化bean的時候,如果bean實現了InitializingBean接口,會自動調用afterPropertiesSet方法。在這之後纔是: 「
相關文章
相關標籤/搜索