请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

swagger-ui集成

师兄,我在项目里集成了swagger-ui组件,但是有个槛死活过不去,就是创建订单时表单里的item字段是//img1.sycdn.imooc.com//szimg/5adada050001df7c01680034.jpg格式,我死活传不进去。

//img1.sycdn.imooc.com//szimg/5adadad700017f7809840303.jpg

2018-04-21 14:31:01.499  WARN 3069 --- [nio-8080-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpected character ('1' (code 49)): was expecting comma to separate Object entries; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character ('1' (code 49)): was expecting comma to separate Object entries

 at [Source: java.io.PushbackInputStream@6bd58c65; line: 3, column: 27]

2018-04-21 14:31:01.499  WARN 3069 --- [nio-8080-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpected character ('1' (code 49)): was expecting comma to separate Object entries; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character ('1' (code 49)): was expecting comma to separate Object entries

 at [Source: java.io.PushbackInputStream@6bd58c65; line: 3, column: 27]

https://img1.sycdn.imooc.com//szimg/5adadbfa000144aa09550206.jpg

请问师兄,swagger-ui是不是不支持x-www-form-urlencoded还是我传的方式不对?师兄当年是如何处理的?

正在回答 回答被采纳积分+3

1回答

廖师兄 2018-04-23 10:20:34

https://blog.csdn.net/liufei198613/article/details/51801908

像这样的问题,我是直接搜索“swagger  x-www-form-urlencoded”

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信