最后找到我的问题,springmvc配置文件中没加 <mvc:annotation-driven/>

java代码:

@RequestMapping(value="/requestJsonResposeJson",method=RequestMethod.POST,produces={"application/json;charset=UTF-8"})
  public @ResponseBody TestSupervisorCustomer  requestJsonResposeJson(@RequestBody TestJson testJson) throws Exception

restclient测试的:

错误信息:

org.springframework.web.servlet.DispatcherServlet]DispatcherServlet with name 'springMvc' processing POST request for [/NongyeInfo/userContoller/requestJsonResposeJson.do]
[org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping]Matching patterns for request [/userContoller/requestJsonResposeJson.do] are [/userContoller/requestJsonResposeJson.*]
[org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping]URI Template variables for request [/userContoller/requestJsonResposeJson.do] are {}
[org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping]Mapping [/userContoller/requestJsonResposeJson.do] to HandlerExecutionChain with handler [slc.controller.UserContoller@3c655b15] and 1 interceptor
[org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver]Resolving exception from handler [slc.controller.UserContoller@3c655b15]: org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported
[org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver]Resolving exception from handler [slc.controller.UserContoller@3c655b15]: org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported
[org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver]Resolving exception from handler [slc.controller.UserContoller@3c655b15]: org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported
[org.springframework.web.servlet.DispatcherServlet]Null ModelAndView returned to DispatcherServlet with name 'springMvc': assuming HandlerAdapter completed request handling
[org.springframework.web.servlet.DispatcherServlet]Successfully completed request
[org.springframework.beans.factory.support.DefaultListableBeanFactory]Returning cached instance of singleton bean 'sqlSessionFactory'

org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported的更多相关文章

  1. org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported或其他Content type不支持处理

    很久没从头到尾搭框架,今天搭的过程中,springmvc controller方法入参用@RequestBody自动绑定参数时一直提示各种 not supported 排查问题有两个解决路径: 1)使 ...

  2. ajax使用向Spring MVC发送JSON数据出现 org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported错误

    ajax使用向Spring MVC发送JSON数据时,后端Controller在接受JSON数据时报org.springframework.web.HttpMediaTypeNotSupportedE ...

  3. Content type 'application/json;charset=UTF-8' not supported异常的解决过程

    首先说一下当时的场景,其实就是一个很简单的添加操作,后台传递的值是json格式的,如下图 ,后台对应的实体类, @Data @EqualsAndHashCode(callSuper = false) ...

  4. org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'multipart/form-data;boundary=----WebKitFormBoundaryRAYPKeHKTYSNdzc1;charset=UTF-8' not supported

    原文:https://www.cnblogs.com/yueli/p/7552888.html 最近同事在做一个图片上传功能.在入参 body 中同时传入文件和其它基本信息结果出现如题异常.在此记录下 ...

  5. SpringMVC在使用JSON时报错信息为:Content type 'application/json;charset=UTF-8' not supported

    直接原因是:我的(maven)项目parent父工程pom.xml缺少必要的三个jar包依赖坐标. 解决方法是:在web子模块的pom.xml里面添加springMVC使用JSON实现AJAX请求. ...

  6. jmeter报"msg":"Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported"的解决方法

    1.报"msg":"Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supporte ...

  7. Jmeter发送post请求报错Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

    常识普及: Content-type,在Request Headers里面,告诉服务器,我们发送的请求信息格式,在JMeter中,信息头存储在信息头管理器中,所以在做接口测试的时候,我们维护Conte ...

  8. Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

    Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported告诉你,你的请求头是application/x- ...

  9. 接入WxPusher微信推送服务出现错误:Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

    背景 使用WxPusher微信推送服务 ,可以及时的将服务的一些运行异常信息,发送到自己的微信上,方便了解服务的运行状态(PS:这个服务是免费的). 你可以在这里看到WxPusher微信推送服务的接入 ...

随机推荐

  1. Primeng UI框架中 分页组件用法

    1.在当前模块或当前页面的对应的module.ts文件中引入相应组件模块,如:core.module.ts模块. import { PaginatorModule } from 'primeng/pr ...

  2. Centos 7 安装openjdk8

    一.使用yum命令搜索支持jdk版本 yum search java|grep jdk 二.使用yum安装jdk8 yum install -y java--openjdk 三.检查是否成功 java ...

  3. 48th Numpy 常见数组

    1.全0数组 np.zeros(shape, dtype=float, order='C') 指定长度的一维数组 >>> np.zeros(5) array([ 0.,  0.,  ...

  4. java 延时

    Java中主要有两种方法来实现延迟,即:Thread和Timer 1.普通延时用Thread.sleep(int)方法,这很简单.它将当前线程挂起指定的毫秒数.如try{Thread.currentT ...

  5. Hands Off for Mac如何卸载?完全卸载Hands Off的方法

    Hands Off for Mac如何卸载?hands off是一款超好用的防火墙软件,在Mac系统上强大且易用,能够控制所有应用的网络连接和文件系统访问,保护我们的隐私数据和系统安全性,如果不需要了 ...

  6. ubuntu安装samba

    1,  sudo apt-get install samba sudo apt-get install smbclient 2,  vi /etc/samba/smb.conf 在最后加字段(为可读可 ...

  7. 分布式存储Ceph之PG状态详解

    https://www.jianshu.com/p/36c2d5682d87 1. PG介绍 继上次分享的<Ceph介绍及原理架构分享>,这次主要来分享Ceph中的PG各种状态详解,PG是 ...

  8. 【2019 Multi-University Training Contest 1】

    01:https://www.cnblogs.com/myx12345/p/11543105.html 02:https://www.cnblogs.com/myx12345/p/11439320.h ...

  9. 关于Extjs6.0 controller文件过大,实现模块化分离

    Extjs一般都是一个视图对应着一个controller 一旦碰到视图中逻辑过于繁琐造成controller文件过大不利于维护和修改,所以要通过混入mixins混入功能来实现模块化! 首先创建一个视图 ...

  10. 【进阶技术】一篇文章搞掂:Docker

    注意!!注意系统内存,一开始我使用阿里云1核1G系统,各种问题,搞了几天,原来是内存不足 一.使用VM虚拟机,安装CentOS7.X系统,并安装和使用Docker 1.1.虚拟机安装CentOS7.X ...