jersey HTTP Status 400 - Bad Request
原因是jersey 内置的转换器,只能做简单的类型转换如:
首先客户端提交上来的一定是String;
String ----> String/Long/Boolean 这些基本的 可以转换,但是如果你如下写:
把String---->Date类型,那么jersey内部 就会出错,报非法的请求报文,无从调试起(花了2天才明白,以后不要再犯)


可以修改为String,然后下面如果用到的地方 转换下,如下图:

jersey HTTP Status 400 - Bad Request的更多相关文章
- SpringMVC格式转化错误之HTTP Status [400] – [Bad Request]
SpringMVC中,如果直接为Date类型的属性赋值,服务器有可能会报HTTP Status [400] – [Bad Request] Type Status Report Description ...
- SpringMVC错误,商品添加信息HTTP Status 400 – Bad Request
记录一个自己在做商品信息显示与传递数据的时候出现的错误, HTTP Status 400 – Bad Request Type Status Report Description The server ...
- springMVC 文件上传 HTTP Status 400 – Bad Request
可能原因是:multipartResolver没有配置正确 请看解决方案: <!--文件上传 id必须为multipartResolver,不然报错HTTP Status 400 – Bad R ...
- SSM搭项目报错:HTTP Status 400 – Bad Request
具体报错如下: Type Status Report Description The server cannot or will not process the request due to some ...
- HTTP STATUS 400 – BAD REQUEST ,SPRINGMVC错误
400大多为前台传的数据于后台接受数据不符合,注意Date数据类型最容易错. 然后需要调用实体类的空参构造方法,,注意创建了有参构造方法后,创建一个空参构造方法.
- HTTP Status 400 - Required request part 'file' is not present
今天使用Spring MVC做一个文件上传的功能,在提交表单的时候出现了如下错误:
- jmeter接口测试 -- status==400(Bad Request)
一.接口请求信息 二.错误的jmeter接口请求 1.请求内容 2.响应内容 三.正确的接口请求 1.看回原本的接口请求信息,company_id = null .这里也就不能空 四.原因分析 1. ...
- HttpWebRequest.GetResponse() raises exception when http status code 400 (bad request) is returned
参考: .Net HttpWebRequest.GetResponse() raises exception when http status code 400 (bad request) is re ...
- HTTP Status 400 - description The request sent by the client was syntactically incorrect.
HTTP Status 400 - type Status report message description The request sent by the client was syntacti ...
随机推荐
- 【纪中集训2019.3.23】IOer
题目 描述 你要在\(m\)天内,刷\(n\)道题,每天可以刷的题的数目不限: 第\(i\)天可以刷的题目的种类是\(ui+v\): 两种刷题的方案不同当且仅当某天刷题的数量不同或者依次刷题的种类不同 ...
- Centos6.7在VMware7.0上的hgfs文件共享
站在各大巨人的肩膀上.总结如下: 1,设置虚拟机共享 虚拟机->setting->options->Shared Folders->Always Enable mount -t ...
- python抓取
我要抓取奥巴马每周的演讲内容http://www.putclub.com/html/radio/VOA/presidentspeech/index.html 如果手动提取,就需要一个个点进去,再复制保 ...
- CSS边框及常用样式
一.CSS设置样式 1.1 边框border 作用:设置标签周围的边框,方法 board:宽度 样式 颜色,一般情况下样式使用 solid实体的,和dotted虚线的 <head> &l ...
- ThreadLocal的实现
0.简介:创建线程局部变量的类 使用ThreadLocal创建的变量只能被当前线程访问,其他线程则无法访问和修改. 内部类ThreadLocalMap实现,key是变量,value是所在的线程. 用法 ...
- 互斥量、条件变量与pthread_cond_wait()函数的使用,详解(一)
1. 首先pthread_cond_wait 的定义是这样的 The pthread_cond_wait() and pthread_cond_timedwait() functions are us ...
- mongodb 跟踪SQL语句及慢查询收集
有个需求:跟踪mongodb的SQL语句及慢查询收集 第一步:通过mongodb自带函数可以查看在一段时间内DML语句的运行次数. 在bin目录下面运行 ./mongostat -port 端口号 ...
- 2015/12/12 考了PAT,又回来玩Python了。
上次写飞机大战的坑还没填完,然后就有好长时间没有更新博客了.可能大家在疑惑我在干什么... 其实不是有意暂停博客更新的,十一月学校里有两个考试要准备,然后有好多实验要做.平时的课余时间本来就不是很多了 ...
- CSS3实战之resize
resize属性可以设置是否允许用户缩放网页中元素的大小 总共有4种取值 none vertical horizontal both 举个栗子 <!DOCTYPE html PUBLIC &qu ...
- git fatal: The remote end hung up unexpectedly 错误
使用git将本地项目添加到远程仓库报以下错误 $ git push -u origin master fatal: The remote end hung up unexpectedly | 11.0 ...