spring中註解分類介紹

spring中註解分類 1. 用於建立對象的(就和xml文件中編寫的bean標籤功能同樣) @Component 做用:把當前類對象存入容器中 屬性:因爲spring容器是個Map集合,所以它是個key-value屬性 key:當不寫時,默認爲類名,首字母小寫 value:用於指定bean的id。當前類的對象 @Component(value = "accountService") public
相關文章
相關標籤/搜索