首页 > 其他分享> > SpringBoot无法访问接口,报错:This application has no explicit mapping for /error, so you are seeing this as a
SpringBoot无法访问接口,报错:This application has no explicit mapping for /error, so you are seeing this as a
作者:互联网
问题
SpringBoot启动后,无法访问接口,报错如下:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
There was an unexpected error (type=Not Found, status=404).
No message available
解决方法
(1)检查SpringBoot的启动类Application类,有没有放在最外层。
展开项目的java文件夹下面的com文件后,就能看出Application类。
Application类跟service、controller等文件夹是在同一层的。如下:
(2)检查url的路径
检查url的路径,是否跟@RequestMapping的路径一致,GET、POST是否一致,参数是否一致。
参考资料:
https://www.cnblogs.com/lilinzhiyu/p/7921890.html
标签:seeing,SpringBoot,无法访问,Application,报错,error 来源: https://www.cnblogs.com/expiator/p/15837518.html