使用@ResponseBody 出现错误Could not find acceptable representation

简介: org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representatio     org.

org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representatio

 
 

org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation

at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:115)

at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:80)

at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:94)

at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:74)

at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)

at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)

at javax.servlet.http.HttpServlet.service(HttpServl

?

?

解决办法 为 ResponseBody 加上getter方法

http://www.rritw.com/a/bianchengyuyan/C__/20130605/322468.html

 

相关文章
|
JSON Java 数据格式
springboot后台下载文件报错: Could not find acceptable representation
使用springboot实现从服务器下载文件功能时,报错:Could not find acceptable representation
1183 0
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC
|
5月前
|
自然语言处理 数据库
Expected one result (or null) to be returned by selectOne(), but found: 2
Expected one result (or null) to be returned by selectOne(), but found: 2
36 0
|
10月前
|
Linux
ERROR: 2 matches found based on name: network product-server_default is ambiguous
ERROR: 2 matches found based on name: network product-server_default is ambiguous
94 0
|
11月前
|
Java Spring
【feign】Could not write request: no suitable HttpMessageConverter found for request type
【feign】Could not write request: no suitable HttpMessageConverter found for request type
317 0
|
编译器
error: pasting “(“ and “1“ does not give a valid preprocessing token
error: pasting “(“ and “1“ does not give a valid preprocessing token
174 0
错误一例:expected expression before } token
错误一例:expected expression before } token
188 0
解决办法:Type safety: The expression of type List needs unchecked conversion to conform
解决办法:Type safety: The expression of type List needs unchecked conversion to conform
194 0
|
计算机视觉
opencv出错:error: (-213:The function/feature is not implemented) Unknown/unsupported array type
opencv出错:error: (-213:The function/feature is not implemented) Unknown/unsupported array type
406 0
使用代码判断某个note是否已经implemented
使用代码判断某个note是否已经implemented
99 0
使用代码判断某个note是否已经implemented