当前位置:网站首页>This application has no explicit mapping for /error, so you are seeing this as a fallback

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

2022-08-09 11:11:00 故丨是

使用 SpringBoot 写了 Hello,SpringBoot! ,配置好启动类后,创建新的Controller,启动项目后访问对应的映射名,页面显示如下错误:在这里插入图片描述

解决办法如下:

  1. 确认写的代码Controller类是否有错,可能少写@Controller注解了。
  2. 确认 url 拼写是否有错
  3. 查看启动类和controller包是否在同级目录下,controller包可以在启动类的子目录下。
原网站

版权声明
本文为[故丨是]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_45965432/article/details/120304947