警告 [http-nio-8080-exec-9] org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.logException Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported]
大概出现了这样的问题,前端用ajax能够正常post,可是若是用postman,只能用表单数据发送,若是用json,后端controller收到的永远是null。
@RequestBody 和 @RequestParam都试过了。前端
缘由应该是缺乏json解析的依赖包,因此maven里加入jackson json的三个包便可。web