springboot @ResponseBody 返回对象报错解决
错误日志如下:
[org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver] [DefaultHandlerExceptionResolver.java:447] Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: No converter found for return value of type: class xxxx
原因:
返回的对象没写get/set方法
返回的对象得有get和set方法
原文:https://jh108020.iteye.com/blog/2429219