springmvc idea 运行 404
来源:互联网 发布:淘宝怎么查历史最低价 编辑:程序博客网 时间:2024/06/06 03:16
在最新的idea环境下,使用springmcv 4.x 发布到tomcat的时候,一直报404的问题,在网上查询得知,需要在配置文件里加入
<mvc:annotation-driven/>
完整文件如下所示
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <mvc:annotation-driven /> <context:component-scan base-package="com.test.controller"/> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix"> <value>/WEB-INF/views/</value> </property> <property name="suffix"> <value>.jsp</value> </property> </bean> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/views/" p:suffix=".jsp"/></beans>
具体原因可以参考这个博客,写的不错
1 0
- springmvc idea 运行 404
- 【安装】IntelliJ IDEA+Maven+SpringMVC+Hibernate项目搭建运行
- idea——发布springmvc报404
- Intellij IDEA 创建SpringMVC报404
- IDEA导入eclipse项目servlet运行404
- ssm搭建超详细可运行(IntelliJ IDEA + maven + Spring + SpringMVC + MyBatis)
- idea配置springmvc
- IDEA使用Maven-Springmvc
- IDEA Maven + SpringMVC DEMO
- springMVC教程+IDEA
- IDEA的Springmvc单元测试
- idea 配置 springMvc dome
- idea运行tomcat工程
- IDEA 远程运行 MapperReduce
- 修改idea运行内存大小
- IDEA 编辑配置运行!
- idea 运行tomcat
- idea调试、运行Cassandra
- 浅谈CSRF攻击方式
- css3实现鼠标移到图片上图片缓慢变大
- VMWare虚拟机提示:锁定文件失败,打不开磁盘的解决办法+查看虚拟机安装目录
- servlet和Spring的DispatcherServlet详解
- PAT 1008. Elevator (20)
- springmvc idea 运行 404
- my-mind在线思维导图软件
- ajax提交整个表单的快捷方式
- 河南工业大学2017“玲珑杯”程序设计竞赛 04
- IIC设备驱动程序(一)————IIC设备的总线及其协议
- HTTP Status 406 – Not Acceptable
- lintcode 375 克隆二叉树
- apply(对象,数组) ,call(对象,变量a,变量b)
- code[vs] 3027线段覆盖2