Spring----學習(10)----通過註解配置bean

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