(12)Spring - 通過註解配置Bean

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