基於註釋配置bean和裝飾bean

1、組件掃描       Spring容器能夠從classpath(類路徑)下自動掃描、偵測和實例化具有特定註釋的組件。 2、特定註釋組件 –@Component: 基本註解, 標識了一個受 Spring 管理的組件 –@Respository: 標識持久層組件 –@Service: 標識服務層(業務層)組件 –@Controller: 標識表現層組件    對於掃描到的組件, Spring 有默
相關文章
相關標籤/搜索