springmvc4.2.X fastjson 替换引用配置

 1 <mvc:annotation-driven>
 2         <mvc:message-converters register-defaults="true">
 3             <bean class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter4" >
 4                 <property name="supportedMediaTypes">
 5                     <list>
 6                         <value>text/html;charset=UTF-8</value>
 7                         <value>application/json</value>
 8                     </list>
 9                 </property>
10                 <property ref="fastJsonConfig" name="fastJsonConfig">
11                 </property>
12             </bean>
13         </mvc:message-converters>
14     </mvc:annotation-driven>
15     <bean id="fastJsonConfig" class="com.alibaba.fastjson.support.config.FastJsonConfig">
16         <property name="serializerFeatures">
17             <list>
18                 <value>DisableCircularReferenceDetect</value>
19             </list>
20         </property>
21         <property name="dateFormat" value="yyyy-MM-dd HH:mm:ss"></property>
22     </bean>

 

posted @ 2017-09-11 12:11  皓子_  阅读(768)  评论(0编辑  收藏  举报