Spring的注入方式

1.set注入spring     1.定義一個屬性,給該屬性添加set方法。this     2.在spring的配置文件中建立bean(該屬性所屬的類),而後在bean中添加<property> 標籤,name的值是該屬性,ref的值是引用其餘bean。如<property name="accountDao" ref=「accountDaoB」>spa                     
相關文章
相關標籤/搜索