IDEA运行简单spingboot浏览器页面报错信息:

Whitelabel Error Page

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

Tue Aug 09 17:41:51 CST 2022

There was an unexpected error (type=Not Found, status=404).

在网上试了很多种方法都不行,包括:

1、Application启动类的位置不对

2、在springboot的核心配置文件:application.yml或application.properties中关于视图解析器的配置问题: 
当pom文件下的spring-boot-starter-paren版本高时使用: 
spring.mvc.view.prefix/spring.mvc.view.suffix 
当pom文件下的spring-boot-starter-paren版本低时使用: 
spring.view.prefix/spring.view.suffix

3、控制器的URL路径书写问题 
@RequestMapping(“xxxxxxxxxxxxxx”) 
实际访问的路径与”xxx”不符合.

以上方法都不行,而且我的Application启动类的位置正确,版本正确,路径正确。后面在一个博主那里找到原因,附上大佬博客链接Spring Boot整合jsp后必须通过spring-boot:run方式启动? - SegmentFault 思否s

解决方法:

1、不用main方法启动,因为通过main方法启动无法渲染。

2、需要用mvn clean spring-boot:run(点击右侧的maven,找到运行的springboot项目,点击插件)启动,因为通过maven启动能够正常渲染jsp页面。

用mvn clean spring-boot:run 运行,成功!!

打开相应的浏览器页面

Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as相关推荐

  1. 解决:Whitelabel Error Page This application has no explicit mapping for /error...UnknownHostException

    前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家.点击跳转到教程. 1. 我的情况 : springcloud 实践,启动 ribbon 工程后,请求接口报错: Whi ...

  2. 当出现Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this

    Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as ...

  3. spring,Whitelabel Error Page,This application has no explicit mapping for /error, so you are seeing

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

  4. 查询商品列表报错This application has no explicit mapping for /error, so you are seeing this as a fallback

    1.问题: Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing t ...

  5. 异常:This application has no explicit mapping for /error, so you are seeing this as a fallback解决方法

    目录 一.错误提示: 二.原因: 三.解决方法1,移动控制层的包: ​四.解决方法二,添加@SpringBootApplication(scanBasePackages="controlle ...

  6. 报This application has no explicit mapping for /error, so you are seeing this as a fallback解决方法

    [现象]SpringBoot项目中访问已经存在的url时,报如下错误: Whitelabel Error Page This application has no explicit mapping f ...

  7. 异常:This application has no explicit mapping for /error.以及spring.mvc.view.prefix配置解决

    <Spring Boot实战派> 实例7实现MVC模式的Web应用程序 遇到的问题 Error resolving template [mvcdemo], template might n ...

  8. P16对member进行代码生成时,访问端口出现This application has no explicit mapping for /error, so you are seeing this

    P16时,当对member进行代码生成时,访问端口出现This application has no explicit mapping for /error, so you are seeing th ...

  9. 【SpringBoot】This application has no explicit mapping for /error,so you are seeing this as a fallback

    [问题现象] SpringBoot中,在请求链接无错误.Controller配置无错误的情况下,访问某个Controller链接接口时,提示错误: This application has no ex ...

最新文章

  1. linux sheel script demo
  2. Jdk1.6 JUC源码解析(13)-LinkedBlockingQueue
  3. 修改oracle用户权限,详解如何实现Oracle修改用户权限和角色
  4. sctf pwn400
  5. mysql日志(介绍 路径修改 备份)
  6. php CI 实战教程:如何去掉index.php目录
  7. AI+医疗——初识庐山真面目
  8. 全志A33 Android4.4 RTL8723DS WIFI/BT驱动调试
  9. 《马云点评创业》读书笔记
  10. r语言如何计算t分布临界值_医学统计与R语言:超几何分布(Hypergeometric distribution)与Fisher精确检验...
  11. 接口返回本站点必须要开启JavaScript才能运行的解决方案
  12. 误Ghost后的分区恢复
  13. firefox新标签页背景_如何更改或自定义Firefox的“新标签页”
  14. 和平精英分数计算机制,和平精英段位对应的积分完整一览 和平精英多少分上王牌...
  15. Python ❀ 插入排序
  16. 中国杰出雇主2023榜单正式揭晓,共有139家企业获得认证 | 美通社头条
  17. Unity3D中文视频教程【超清+精选】
  18. 【个人练习3.11】7 c++练习题
  19. AB测试的介绍与实施
  20. MLT教程:从BXL文件导入Altium Designer原理图封装和PCB封装

热门文章

  1. 组建一个计算机网络系统有,组建一个计算机网络一般需要哪些部件
  2. Python如何将一个列表拆分,将多个数据作为一个元素存放到元组中
  3. 休闲娱乐 - 种花记
  4. html播放mov格式视频,jQuery及video标签视频播放弹窗插件支持mp4,mov等格式详解(图文)...
  5. (六)高德地图之驾车路线规划
  6. NLP文本情感分析:测试集loss比训练集loss大很多,训练集效果好测试集效果差的原因
  7. maya腿的蒙皮旋转枢轴_MAYA更改、移动枢轴点
  8. loss.item()大坑
  9. 华为OD机试真题 C++ 实现【预订酒店】【2022.11 Q4 新题】
  10. 财务自由?这样做微信开发可以吗?