关闭

java.lang.IllegalStateException: Argument [RedirectAttributes] is of type Model

标签: Spring MVC
1199人阅读 评论(0) 收藏 举报
分类:

java.lang.IllegalStateException: Argument [RedirectAttributes] is of type Model or Map but is not assignable from the actual model. You may need to switch newer MVC infrastructure classes to use this argument. 

解决方法:在springmvc文件里加上这个标签:<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:mvc="http://www.springframework.org/schema/mvc" 
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd 
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd 
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"> 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:18723次
    • 积分:250
    • 等级:
    • 排名:千里之外
    • 原创:1篇
    • 转载:39篇
    • 译文:0篇
    • 评论:1条
    文章分类