使用@ResponseBody的方式,将Map形返回值转为json,用作POST请求的返回值。为了解决406 Not Acceptable错误,需要检查以下几项:

1. 依赖包中包含jackson-mapper-asl, jackson-core-asl

2.springmvc的xml文件中包含<mvc:annotation-driven />,bean的配置为

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">

最新文章

  1. 30分钟?不需要,轻松读懂IL
  2. Markdown语法说明(详解版)
  3. bower
  4. 2014.1.23 Discuz论坛迁移+VPS配置手记
  5. 无状态服务(stateless service)
  6. file not found while xcode archive
  7. OC班级类
  8. 暑假集训(3)第一弹 -----还是畅通工程(hdu1233)
  9. python常用的一些东西——sys、os等
  10. vb6.0 倒计时
  11. nodejs简单数据迁移demo
  12. 7年,OpenStack从入门到放弃|送书
  13. Javascript初识之流程控制、函数和内置对象
  14. 小程序之 swiper高度根据图片高度变化
  15. Mariadb Redis 的配置使用
  16. Python语言知识总结
  17. oauth2-server-php-docs 概念
  18. 用 C# 计算 与 java 一致的unix时间戳 (长时间整形 如:1476956079961)
  19. Codeforces 837D - Round Subset(dp)
  20. Html5音频播放

热门文章

  1. 二叉树 【转】http://blog.csdn.net/sjf0115/article/details/8645991
  2. 使用java去对比2个带数学公式的字符串
  3. Nginx下配置codeigniter框架
  4. HDU 4681 String 胡搞
  5. Problem 1036 四塔问题
  6. SqlHelper——数据库小助手
  7. 思梦PHP-阿里大鱼手机验证码
  8. 【bzoj2959】长跑 LCT+并查集
  9. Eclipse中一个Maven工程的目录结构 (MacOS)
  10. 详解Django-auth-ldap 配置方法