1、出現這樣的錯誤:The type org.springframework.core.NestedRuntimeException cannot be resolved. It is indirectly referenced from required .class files怎樣解決啊?!!
org.springframework.core.NestedRuntimeException
在org.springframework.core-3.0.5.RELEASE.jar中,導入就好了
2、** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.
因為application.Java 文件不能直接放在main/java文件夾下,必須要建一個包把他放進去
https://stackoverflow.com/documentation
3、spring-boot啟動時出現
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
很像是沒有讀到你要訪問的地址。
原因是【Application啟動類放的位置不對】要將Application放在最外層,也就是要包含所有子包。
比如你的groupId是com.google,子包就是所謂的com.google.xxx,所以要將Application放在com.google包下。
請參考以下結論:spring-boot會自動加載啟動類所在包下及其子包下的所有組件.