项目用MAVEN管理Jar包,依赖了fastjson、jackson-all。
@RequestBody接收json时出现415报错。
后来加了一个sms包,sms包里面有google的gson的class,然后就不报415错误了。
想知道这里spring会调用哪个包进行反序列化的?
天蓬老师2017-04-18 10:32:19
The result of ResponseBody is controlled by org.springframework.http.converter.HttpMessageConverter.
Subclasses include
GsonHttpMessageConverter which uses Google GSON serialization
MappingJackson2HttpMessageConverter which uses jackson
FastJsonHttpMessageConverter which uses alibaba fastjson