码迷,mamicode.com
首页 > 编程语言 > 详细

Spring boot Jetty 服务器相比tomcat的一些不足

时间:2015-11-07 16:15:49      阅读:659      评论:0      收藏:0      [点我收藏+]

标签:

spring boot 使用tomcat服务器


PUT请求 Body中多了一个字段 会有明确的提示 

{
  "code": 400,
  "error": "Bad Request",
  "message": "Could not read document: Unrecognized field \"id\" (class com.XXX), not marked as ignorable (8 known properties: ...])\n at [Source: java.io.PushbackInputStream@51c5845a; line: 2, column: 12] (through reference chain: com.XXX[\"id\"]); nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field \"id\" (class com.XXX), not marked as ignorable (8 known properties: ...])\n at [Source: java.io.PushbackInputStream@51c5845a; line: 2, column: 12] (through reference chain: com.XXX[\"id\"])",
  "exception": "org.springframework.http.converter.HttpMessageNotReadableException"
}

表示请求Json中多了一个id属性。

但若用Jettty的话 只有如下提示(swagger ui界面中)

技术分享


如果是POST请求的话 会是如下的输出

{
    "code": 400, 
    "error": "Bad Request", 
    "message": "Bad Request", 
    "exception": "org.springframework.http.converter.HttpMessageNotReadableException"}

但仍不知道具体的错误原因 如多了哪个属性

可见Jetty对PUT方法支持的也不是很好

Spring boot Jetty 服务器相比tomcat的一些不足

标签:

原文地址:http://my.oschina.net/zhuguowei/blog/527310

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!