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

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 20:26   2771   0

https://blog.csdn.net/Leo_libin/article/details/84101663?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.control&dist_request_id=1328740.28088.16169337811408535&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.control

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


分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP