@SpringBootApplication(用法)(@ComponentScan掃描包問題)

spring boot的啓動類上使用@SpringBootApplication而沒有使用java @ComponentScan註解時,此時@ComponentScan默認掃描啓動類的所在的包和子包下面全部的註解。 實例1:spring spring boot項目下面有:com.test.a和com.test.b包springboot spring boot的啓動類 在com.test.a下面,i
相關文章
相關標籤/搜索