Spring 基於 annotation 的自動裝配

Spring 基於annotion 的自動裝配 在 classpath 中掃描組件 組件掃描(component scanning): Spring 可以從 classpath 下自動掃描, 偵測和實例化具備特定註解的組件. 特定組件包括: - @Component: 基本註解, 標識了一個受 Spring 管理的組件 - @Respository: 標識持久層組件 - @Service: 標識服
相關文章
相關標籤/搜索