问题:

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of

`com.yiyezhiqiu.comconnectionsend.model.RequestEntity` (no Creators, like default construct, exist):

cannot deserialize from Object value (no delegate- or property-based Creator)

读一下问题,大概是说某个实体类数据绑定异常,如没有默认构造器存在。

jackson在反序列化的时候必须要提供默认构造,而自己实体类中写了带参构造,导致无法生成无参构造,故手动添加无参构造即可。

在RequestBody和ResponseBody来接收和返回数据时多注意这点。

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2020-12-30
  • 2021-08-27
  • 2021-05-24
  • 2021-05-21
猜你喜欢
  • 2022-03-03
  • 2022-01-01
  • 2022-12-23
  • 2021-06-24
  • 2021-11-28
  • 2021-08-15
  • 2022-12-23
相关资源
相似解决方案