互联网真是个鱼龙混杂的地方,抄博客的时候能不能先实验一下再抄。想找个正确的解决方法还是要看官方文档的,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

错误原因:

代码结构与官方不符:

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

解决方法:改一下目录结构:

把application.java放在项目根目录下:

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

 

相关文章:

  • 2021-08-25
  • 2021-07-02
  • 2022-12-23
  • 2021-06-11
  • 2021-05-07
  • 2021-07-14
猜你喜欢
  • 2021-07-03
  • 2021-04-22
  • 2021-08-05
  • 2021-10-22
  • 2021-09-08
相关资源
相似解决方案