java.lang.String cannot be cast to org.springframework.http.MediaType 异常分析
来源:互联网 发布:sql注入漏洞修复工具 编辑:程序博客网 时间:2024/05/16 17:06
<p>在spring 3.0.5之前一般是这样使用的:<span style="font-family: Arial, Helvetica, sans-serif;"></span></p>
<property name="mediaTypes"><map><entry key="html" value="text/html" /><entry key="xml" value="application/xml" /><entry key="json" value="application/json" /></map></property>
由于升级之后就不能写,必须如下所示:
<span style="white-space:pre"></span><property name="contentNegotiationManager"> <bean class="org.springframework.web.accept.ContentNegotiationManager"> <constructor-arg> <bean class="org.springframework.web.accept.PathExtensionContentNegotiationStrategy"> <constructor-arg> <map> <entry key="json" value="application/json"/> <entry key="xml" value="application/xml"/> <entry key="html" value="text/html"/> </map> </constructor-arg> </bean> </constructor-arg> </bean> </property>
0 0
- java.lang.String cannot be cast to org.springframework.http.MediaType 异常分析
- springMVC3.2 多视图解析器 java.lang.String cannot be cast to org.springframework.http.MediaType
- org.mule.transport.http.ReleasingInputStream cannot be cast to java.lang.String
- [Ljava.lang.String; cannot be cast to java.lang.String
- [Ljava.lang.String; cannot be cast to java.lang.String
- java.lang.Integer cannot be cast to java.lang.String
- java.lang.Character cannot be cast to java.lang.String
- java.lang.Integer cannot be cast to java.lang.String
- java.lang.Long cannot be cast to java.lang.String
- java.lang.String cannot be cast to java.lang.Integer
- java.lang.String cannot be cast to [Ljava.lang.Object
- java.lang.String cannot be cast to [Ljava.lang.Object
- java.lang.String cannot be cast to [Ljava.lang.Object;
- java.lang.String cannot be cast to [Ljava.lang.Object
- org.apache.struts2.rest.DefaultHttpHeaders cannot be cast to java.lang.String
- java.lang.String cannot be cast to java.util.Date
- java.lang.String cannot be cast to java.util.Date
- java.lang.string cannot be cast to java.sql.timestamp
- SQL --NULL的注意事项
- 在S3C2440和AM335X上 使用RTL8192CU
- SpringMVC学习笔记(7):处理模型数据(2)
- lua脚本语言在WireShark中的使用浅析
- 简单的网络技术及数据解析
- java.lang.String cannot be cast to org.springframework.http.MediaType 异常分析
- AFNetworking3.1 基本使用
- Retrofit结合RxJava的一次实践
- 01背包问题
- HDU 5361 (优先队列 线段树)
- 自定义按钮三态
- 内核设备驱动学习启动篇(个人笔记)
- Redis3.x-集群搭建
- android布局属性