Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package

是因爲application.java 文件不能直接放在main/java文件夾下,必須要建一個包把他放進去

項目完整代碼:

https://gitee.com/mayun_hzy/SpringBootTest

參考:

項目只會導入不會搭建(Springboot+Maven多模塊從零開始)

Spring-boot 啓動時碰到的錯誤

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章