关于springmvc引用json配置会报错的问题
2015-06-05 15:48
417 查看
查找得出的问题是xml头文件的问题
修改头文件后为:
<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/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
default-lazy-init="true">
在引用json的支持标签
<!-- 支持对象与json的转换 -->
<mvc:annotation-driven />
就可以用上json了
修改头文件后为:
<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/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
default-lazy-init="true">
在引用json的支持标签
<!-- 支持对象与json的转换 -->
<mvc:annotation-driven />
就可以用上json了
相关文章推荐
- 扩展SpringMVC以支持更精准的数据绑定
- java三种排序比较
- 扩展SpringMVC以支持绑定JSON格式的请求参数
- Spring中引入properties文件
- JAVASE学习笔记:第七章 常用类Lang包之包装类
- JVM中java对象的生命周期
- LeetCode_20---Valid Parentheses
- (转)Spring实例化
- eclipse
- 用Struts2写的第一个"Hello,World!"
- atitit.spring3 mvc url配置最佳实践
- SpringMVC学习(一)
- JAVA设计模式之单例模式
- Struts2高危漏洞分析和解决方案
- JAVA自定义注释(Target,Retention,Documented,Inherit)
- java正则表达式匹配日期
- JDK环境变量的配置
- eclipse jdk配置
- 聚类算法之CHAMELEON(Java实现)
- 如何用myeclipse创建servlet并进行部署