spring_(13)通過註解配置之一

在classpath中掃描組件 組件掃描(component scanning):Spring 能夠從classpath下自動掃描,偵測和實例化具有特定註解的組件. 特定組件包括: @Component:基本註解,標識了一個受Spring管理的組件 @Respository:標識持久層組件 @Service:標識服務層(業務層)組件 @Controller:標識表現層組件 UserService
相關文章
相關標籤/搜索