sprint boot入門常見問題解決

按照官方的入門手冊搭建,會遇到一些坑,如今總結以下java

1.用eclipse開發的話,須要安裝插件sts。

能夠在軟件市場中搜索下載。安裝完,選擇main類,右鍵會有 run as --》spring boot appgit

2.異常:This application has no explicit mapping for /error, so you are seeing this as a fallback.

緣由是【Application啓動類放的位置不對】要將Application放在最外層,也就是要包含全部子包。spring

好比你的groupId是com.google,子包就是所謂的com.google.xxx,因此要將Application放在com.google包下。app

請參考如下結論:spring-boot會自動加載啓動類所在包下及其子包下的全部組件.eclipse

3.eclipse run as(或者debug as)後,javaw進程會在後臺,不會自動結束。

須要在下次調試前,手動kill javaw.exe 進程。spring-boot

參考: https://gitee.com/didispace/SpringBoot-Learningthis

相關文章
相關標籤/搜索