1. 程式人生 > >解決錯誤:Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

解決錯誤:Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

context 錯誤 com sta spa can src 直接 代碼

原因是代碼直接放在默認包裏邊,比如src\main\java目錄下

應該在src\main\java下建立子目錄,比如src\main\java\com\test

這樣的話,代碼就在com.test這個包下面了,這個錯誤也就不會再出現了

解決錯誤:Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.