一個簡單的spring boot 模板 寫一個/hello的controller,啟動main,訪問http://localhost:8080/hello后一直報錯:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue May 08 13:41:33 CST 2018
There was an unexpected error (type=Not Found, status=404).
No message available
解決辦法:
啟動main一定要放在groupId下面,我的groupId為com.ly,之前我的放在com.ly.demo下一直出現這個問題,修改到com.ly后成功。