zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    特性类
    WebGL中的第三个小程序(着色器)
    C#紧耦合的例子
    特性
    python两个目录匹配,粘贴图片
    Leetcode 53
    逻辑回归-1.原理
    多项式回归-4.模型正则化
    python 线程
    python 进程
  • 原文地址:https://www.cnblogs.com/xiao-lin-unit/p/13712264.html
Copyright © 2011-2022 走看看