1. 程式人生 > >Whitelabel Error Page This application has no explicit mapping for /error, so 避坑!!!

Whitelabel Error Page This application has no explicit mapping for /error, so 避坑!!!

網際網路真是個魚龍混雜的地方,抄部落格的時候能不能先實驗一下再抄。想找個正確的解決方法還是要看官方文件的,springboot專案:

報錯如下:

Whitelabel Error Page

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

Thu Nov 15 11:41:07 CST 2018

There was an unexpected error (type=Not Found, status=404).

No message available

錯誤原因:

程式碼結構與官方不符:

解決方法:改一下目錄結構:

把application.java放在專案根目錄下: