初次學習springboot啟動時報錯
阿新 • • 發佈:2019-01-28
按照文件配置後,在controller裡面寫方法,使用了@RestController註解,但是一直報錯如下:
Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback. Wed Dec 14 16:35:25 CST 2016There was an unexpected error (type=Not Found, status=404).No message available |
後面發展問題,啟動類SpringbootfirstApplication需要放在所有包的外面,問題解決.
比如說,你建立了很多包,com.yh.controller,com.yh.service,com.yh.entity等等,而啟動檔案放在com.yh包下,問題解決.