javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: 前言中不
「已注销」 2016-09-08 10:56:14 自己配了一个MarshallingHttpMessageConverter如下:
<bean class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter"
p:marshaller-ref="xmlMarshaller"
p:unmarshaller-ref="xmlMarshaller">
</bean>
<bean id="xmlMarshaller" class="org.springframework.oxm.xstream.XStreamMarshaller">
<property name="streamDriver">
<bean class="com.thoughtworks.xstream.io.xml.StaxDriver"></bean>
</property>
<property name="annotatedClasses">
<list>
<value>spring.mvc.part1.User</value>
</list>
</property>
</bean>
通过ajax发起调用
*$.ajax({
* headers: {
* Accept: "application/xml;charset=UTF-8"
* },
* url:"http://localhost:8080/spring-3x-study/springmvc/handler51.do",
* data: {"userName" : "Boston"},
* type:"post",
* contentType:"application/xml;charset=UTF-8",//(可以)
* sucess : function(result) {
* $(":input[name='returnValue']").val(result);
* }
* });
但总是报错,不知道怎么办