java\]springmvc中controller路由出现404
## problem
\[java\]springmvc中controller路由出现404
## reason
可能原因有很多
* idea配置不对
* 编译配置不对
* xml配置
* jsp位置
## solution
1. 核对idea配置
mac: idea-\>File -\> Project Structure

最重要的是 Artifacts,默认配置不对需要手动添加lib包

2. 核对编译配置
mac: idea -》Run -》Edit Configurations -》 点绿色的+号,选择 tomcat--\>local -》出现弹窗
弹窗配置server
* name: tomcat8
* application server: 选择tomcat 的安装目录
* URL: 改为 http://localhost:8080/ 默认是 http://localhost:8080/spring02_mvc_war_exploded/
弹窗配置Deployment
* 点击 + 号
* 选择: Artifact...
* 选择完成后,中间区域出现 spring02-mvc:war exploded
* Application context: / 默认是 /spring02_mvc_war_exploded

3. xml配置
```xml
springmvc中controller路由出现404
snowDreamzzz2023-12-31 13:29
相关推荐
一诺加油鸭1 天前
若依后端系统集成 Swagger 接口文档功能云烟成雨TD1 天前
Spring AI Alibaba 1.x 系列【40】多智能体核心模式 - 智能体作为工具(Agent as Tool)测试员周周1 天前
【踩坑系列3】飞书机器人集体“失联“?3 个 Gateway 进程让我差点崩溃!一个测试老兵的排查实录aq55356001 天前
Laravel9.x新特性全解析亦暖筑序1 天前
AI 客服系统升级实战:多 Agent 路由 + 多轮记忆 + 敏感词过滤zhangzeyuaaa1 天前
深入理解 Python GIL:从机制到释放时机河阿里1 天前
Spring AOP:企业级实战教学lagrahhn1 天前
IDEA一些提效的方法yuanpan1 天前
Python Scrapy 入门教程:从零学会抓取和解析网页数据Bat U1 天前
JavaEE|多线程(五)