、jackson、xStream、castor、jibx、jaxb2

、jackson、xStream、castor、jibx、jaxb2

ID:22703779

大小:111.20 KB

页数:63页

发布时间:2023-10-23 05:46:02

资源描述:

SpringMVC利用XML、JSON视图SpringMVC中整合了JSON、XML的视图,可以通过这些视图完成Java对象到XML、JSON的转换。转换XML提供了MarshallingView,开发者只需用注入相应的marshaller、和属性配置,即可自动完成Java的Model对象中的数据到XML的编组。Blog:http://blog.csdn.net/IBM_hoojohttp://hoojo.cnblogs.com/一、准备工作1、本次程序会涉及到Jackson、xStream、Jibx、Jaxb2、castor等技术,如果你对|这些技术还不是很了解。建议阅读:http://www.cnblogs.com/hoojo/archive/2011/04/27/2030264.html这篇文章中涉及到的内容应该对你有不少帮助。2、jar包下载spring各版本jar下载地址:http://ebr.springsource.com/repository/app/library/detail?name=org.springframework.spring相关的依赖包也可以在这里找到:http://ebr.springsource.com/repository/app/libra|ry3、至少需要以下jar包4、当前工程的web.xml配置dispatcher

1org.springframework.web.servlet.DispatcherServletcontextConfigLocation/WEB-INF/dispatcher.xml1dispatcher*.docharacterEncodingFilterorg.springframework.web.filter.Ch|aracterEncodingFilterencodingUTF-8characterEncodingFilter/*index.jsp1、WEB-INF中的dispatcher.xml配置

2xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.spring|framework.org/schema/mvchttp://www.springframework.org/schema/mvc/spring-mvc-3.0.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.0.xsdhttp://www.springframework.org/schema/utilhttp://www.springframework.org/sche|ma/util/spring-util-3.0.xsd">