返回的json数据前台页面报406,而后台没有报错,下面为解决方法

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd">
<context:component-scan base-package="com.jadyer"/> <mvc:annotation-driven>
<mvc:message-converters register-defaults="true">
<bean class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
<property name="supportedMediaTypes" value="text/html;charset=UTF-8"/>
<property name="features">
<array>
<value>WriteMapNullValue</value>
<value>WriteNullStringAsEmpty</value>
</array>
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>   此处省略其他配置.... </beans>

使用fastjson前台报406的问题解决方法的更多相关文章

  1. springMVC下ajax获取后台参数直接走错误或者报406错误问题解决

    直接走错误: 返回的结果是否json化,直接返回非字符串的结果会走ajax的error函数. 报406错误: 我在学习springmvc过程中(我的项目是配置的后缀是.html),从controlle ...

  2. MySQL中使用group_concat()函数数据字符过长报错的问题解决方法

    最近在办公软件项目,在开发权限指标遇到一个问题:我们系统的一些逻辑处理是用存储过程实现的,但是有一天客户反馈说权限指标分配报错,查了分配的权限数据牵扯到的数据权限基础资源,没有问题.权限指标分配的存储 ...

  3. Windows7 IE11 F12控制台DOC资源管理器报错的问题解决方法

    ------------------ Diagnostic: Exception in window.onload: Error: An error has ocurredJSPlugin.3005 ...

  4. mybatis批量update操作的写法,及批量update报错的问题解决方法

    mybatis的批量update操作写法很简单,如下: public interface YourMapper extends BaseMapper<YourExt> { void upd ...

  5. Spring3 报org.aopalliance.intercept.MethodInterceptor问题解决方法

    原文:Spring3 报org.aopalliance.intercept.MethodInterceptor问题解决方法 一 开发环境:JDK5+Spring3.0.5+Myeclipse6.6+T ...

  6. 关于Spring3报org.aopalliance.intercept.MethodInterceptor错的问题解决方法_JavaLeader_新浪博客

    body { font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI ...

  7. Springmvx拦截html出现406解决以及Server Tomcat v8.0 Server at localhost failed to start 问题解决方法

    问题是这样的:环境是SSM框架,在配置好的框架里想请求一个html,结果406了,406就是HTTP协议状态码的一种,表示无法使用请求的特性来响应请求的网页.一般指客户端浏览器不接受所请求页面的MIM ...

  8. springBoot上传文件时MultipartFile报空问题解决方法

    springBoot上传文件时MultipartFile报空问题解决方法 1.问题描述: 之前用spring MVC,转成spring boot之后发现上传不能用.网上参考说是spring boot已 ...

  9. (转) Spring 3 报org.aopalliance.intercept.MethodInterceptor问题解决方法

    http://blog.csdn.net/henuhaigang/article/details/13678023 转自CSDN博客,因为一个jar包没引入困扰我好长时间 ,当时正在做spring A ...

随机推荐

  1. Axure RP的版本控制

    首先介绍一下Axure RP,Axure的发音是Ask-Sure,RP是Rapid Prototype的缩写,写到这里你知道了这是一款原型绘画工具.本节主要介绍Axure RP的版本管理也即Axure ...

  2. Contest 20141027 总结

    这次考试主要问题出在第一题,由于考试期间没有看清题意,少看了一句 “a=A/1e9" 导致在考试结束最后5分钟发现时修改过于匆忙,改出问题了.另外,这道题同时告诉我long double 在 ...

  3. [BZOJ 1115] [POI2009] 石子游戏Kam 【阶梯博弈】

    题目链接:BZOJ - 1115 题目分析 首先看一下阶梯博弈: 阶梯博弈是指:初始有 n 堆石子,每次可以从任意的第 i 堆拿若干石子放到第 i - 1 堆.最终不能操作的人失败. 解法:将奇数位的 ...

  4. In machine learning, is more data always better than better algorithms?

    In machine learning, is more data always better than better algorithms? No. There are times when mor ...

  5. RedHat 6.5 离线安装 apache2.4.23

    第一部分:安装gcc等 rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm rpm -ivh cpp- ...

  6. Bomb Game

    hdu3622:http://acm.hdu.edu.cn/showproblem.php?pid=3622 题意:你有n次,每次你可以在平面上放置一个点,并且每一次都会有两个位置可以选,每一次只能选 ...

  7. 【转】不同VLAN之间相互通信及VTP、STP、EtherChannel概念

    厘清最后一个概念. 转了网上两个相关帖子: http://www.net130.com/CMS/Pub/Tech/tech_zh/2009_03_12_97386_3.htm http://blog. ...

  8. linux里的php使用phpize拓展各种功能(curl,zip,gd等等)

    这里的实验以拓展zip功能为实例,成功使用zip功能需要如下步骤: 1.下载zip拓展包,并解压,并进入zip文件夹 tar -zxvf zip.tar.gz // 解压 cd zip //进入文件夹 ...

  9. 利用ROWID 快速更新单表记录

    -----对于普通表 实现: UPDATE T_PM_DEPOSIT_HIS b SET flag = SUBSTR( flag, 1, 8 )||'4'|| CASE WHEN term <= ...

  10. js对ajax返回数组的处理

    引言: ajax异步传输,可以传输字符串,但是数组这样的数据,就不太好传递了,这个时候怎么办呢? 答案是可以通过json来处理,后台将数据数据进行json编码! 然后客户端,通过js来进行解析. 这样 ...