SpringBoot运行后,前端出现Whitelabel Error Page

前端出现:

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=Internal Server Error, status=404).
 
控制台中包含:

getResource(templates/error/4xx.html)

--------------------------------------------------------------------------------------------

templates中的html为动态页面,需要通过控制器访问。

检查Controller中的RequestMapping

标在类和方法上的注释

-------------------------------------------------------------------------------------------

访问不到资源的情况:

1.资源不存在

2.资源文件路径错误

3.Controller和SpringBoot程序入口的位置

4.环境配置

5.请求的编写错误

posted @   NetUSA  阅读(371)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
点击右上角即可分享
微信分享提示