SpringBoot2 學習11常用註解

@SpringBootApplication 用於springboot項目的啓動類上。 相當於三個註解 @ComponentScan : 表示Springboot 會從當前包,往下掃描,去發現springboot的其他註解(@Controller,@RequestMapping等等springboot的註解)。所以springboot項目的,所有代碼必須在啓動類的同一個包,或者子包裏面。 @Aut
相關文章
相關標籤/搜索