SpringBoot:HttpMessageNotWritableException: No converter found for return value of type

 在使用springboot做项目时遇到了 SpringBoot:HttpMessageNotWritableException: No converter found for return value of type  这个问题,由于springboot项目中对json数据转换的依赖已经在web依赖中配置好了,所以在springboot中对于大多数答案中的json-core、json-annotationa、json-databind的依赖的问题不用关心,这是使用springmvc需要自己添加依赖带来的问题。我出现这个问题的原因是没有添加getter和setter,由于使用静态方法创建返回数据对象的实例,所以没有添加getter和setter,导致对象转json对象时无法解析。添加getter和setter方法后解决,是否有其他原因待定。

参考链接地址:https://blog.csdn.net/sinat_29047129/article/details/104879904

原文地址:https://www.cnblogs.com/xiao-lin-unit/p/13712264.html