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

  • 相关阅读:
    一些css
    nginx访问静态资源
    ngixn 基本命令
    vue打包
    java集合-HashMap
    java多线程-线程池
    java多线程-中断线程
    服务端获取nginx代理后的用户真实ip
    nginx学习笔记
    数码视讯宣讲会现场笔试题
  • 原文地址:https://www.cnblogs.com/xiao-lin-unit/p/13712264.html
Copyright © 2011-2022 走看看