Spring常用的註解開發的解釋

常用的註解 1.用與創建對象的 @Component 相當於:<bean id="" class=""> 作用: 作用:     把資源讓spring來管理。相當於在xml中配置一個bean。 屬性:     value:指定bean的id。如果不指定value屬性,默認bean的id是當前類的類名。首字母小寫。    @Controller @Service @Repository 他們三個註解
相關文章
相關標籤/搜索