SpringMVC收发带CDATA的xml报文

本文详细探讨了如何在SpringMVC框架中接收和发送包含CDATA段的XML报文,重点介绍了使用Eclipselink库进行XML处理的方法和步骤。
摘要由CSDN通过智能技术生成

首先需要引入eclipselink包:

<span style="white-space:pre">		</span><dependency>
			<groupId>org.eclipse.persistence</groupId>
			<artifactId>eclipselink</artifactId>
			<version>2.5.0</version>
		</dependency>
实体类包下面需要添加jaxb.properties文件:

javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory


 实体类使用如下注解: 

package com.chinamobile.cmss.ehub.ssb.test.entity;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import org.eclipse.persistence.oxm.annotations.XmlCDATA;

@XmlRootElement(name="InterBOSS")
@XmlAccessorType(XmlAccessType.FIELD)
public class UserStateR
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值