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
相关推荐
wei_shuo33 分钟前
飞算 JavaAI 开发助手:深度学习驱动下的 Java 全链路智能开发新范式欧阳秦穆1 小时前
apoc-5.24.0-extended.jar 和 apoc-4.4.0.36-all.jar 啥区别岁忧1 小时前
(LeetCode 面试经典 150 题 ) 58. 最后一个单词的长度 (字符串)Java初学者小白1 小时前
秋招Day14 - Redis - 应用代码老y1 小时前
Spring Boot + 本地部署大模型实现:优化与性能提升GodKeyNet1 小时前
设计模式-桥接模式guojl2 小时前
Java多任务编排技术丶意冷2 小时前
mybatisPlus分页方言设置错误问题 mybatisPlus对于Oceanbase的Oracle租户分页识别错误要开心吖ZSH3 小时前
《Spring 中上下文传递的那些事儿》Part 4:分布式链路追踪 —— Sleuth + Zipkin 实践桦说编程3 小时前
深入解析CompletableFuture源码实现