Spring Injections/annotation

需依來源/條件產出bean時, 讓物件implements相同interface, 之後可用@Autowired List<物件>設定, 取用所有物件

依來源/條件產出bean, 並將來源/條件設為enum, 關聯物件及enum值存在map以取用

bean建構子傳不特定參數寫法

bean裡需依情況在建構子inject不同設定(e.g.api代碼,來源別...)寫法

types of Dependency Injections: field, setter, constructor.

spring configuration: XML, Java code or annotations.

Instantiating beans.

Bean Lifecycle.

...繼續閱讀 »