SPringMVC返回JSON对象遇到报错:org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.logException Resolved [org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class java.util.ArrayList] with preset Content-Type 'null']
错误代码
@RequestMapping(value = "/test" , produces = {"text/html" , "application/json"})
改正后
@RequestMapping(value = "/test" , produces = {MediaType.APPLICATION_JSON_VALUE})
错误原因
SpringMVC在解析返回对象的时候produces属性的text/html和application/json有冲突
标签:返回,produces,SpringMVC,text,json,JSON From: https://www.cnblogs.com/yuehuo9426/p/17235630.html