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
相关推荐
kk哥889914 分钟前
如何快速掌握JavaSE的核心语法?我是一只小青蛙88815 分钟前
AVL树:平衡二叉搜索树原理与C++实战浩瀚地学39 分钟前
【Java】JDK8的一些新特性XXOOXRT2 小时前
基于SpringBoot的加法计算器阿崽meitoufa2 小时前
JVM虚拟机:垃圾收集器和判断对象是否存活的算法我是苏苏2 小时前
C#高级:使用ConcurrentQueue做一个简易进程内通信的消息队列编程小风筝3 小时前
Spring 框架如何整合Redis缓存中间件?heartbeat..4 小时前
数据库基础知识体系:概念、约束、范式与国产产品PXM的算法星球4 小时前
【操作系统】哲学家就餐问题实现详解