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

今天开始学习spring boot,遇到了一个菜鸟很可能犯的错误就是spring boot的主类没有放在最外层(这里的最外层意思是和controller、service等同一级别就行),因此出现了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."表示应用程序没有对"/error"路径进行显式的映射,所以你才看到这个错误。解决这个问题的方法有两种。首先,你需要检查配置文件application是否与你的项目文件在同一级目录下。其次,你需要确保控制该页面的controller和控制页面跳转的controller的@RequestMapping后面的地址是否与该页面一致。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [报错:this application has no explicit mapping for /error, so you are seeing this as a fallback.](https://blog.csdn.net/caihongfengzhu/article/details/130165404)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* *3* [报错This application has no explicit mapping for /error, so you are seeing this as a fallback.](https://blog.csdn.net/a1782519342/article/details/124749723)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值