关于feign.codec.DecodeException异常的解决方案
作者:熊熊爱绵羊 时间:2022-01-28 15:50:19
feign.codec.DecodeException异常
在微服务项目使用Feign进行远程服务调用时
出现该异常:
feign.codec.DecodeException: Type definition error: [simple type, class entity.Result]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `entity.Result` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator) at [Source: (PushbackInputStream); line: 1, column: 2]
报该错的原因是 构造的Result对象没有 空的构造器
加上 空的构造器即可。
解决错误Type definition error: [simple type, classXXX
类上面加
@AllArgsConstructor
@NoArgsConstructor
来源:https://blog.csdn.net/m0_37564404/article/details/99627205
标签:feign,codec,DecodeException
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Android ViewPager实现图片轮播效果
2023-03-20 17:00:58
![](https://img.aspxhome.com/file/2023/7/98627_0s.jpg)
C#中跨线程访问控件问题解决方案分享
2021-06-27 18:47:24
C# winform循环播放多个视频
2021-06-30 06:39:21
关于maven全局配置文件settings.xml解析
2023-01-08 09:04:04
![](https://img.aspxhome.com/file/2023/3/66233_0s.jpg)
C# 中 System.Index 结构体和 Hat 运算符(^)的使用示例
2023-02-27 11:40:23
Flutter Shell自动化打包解放双手
2021-09-17 18:39:15
详解Java枚举为什么是单例模式的最佳选择
2022-07-16 20:42:47
Android编程之自定义锁屏实例分析
2022-02-02 04:01:50
如何实现Spring Event(异步事件)
2023-08-23 05:06:47
Java执行JS脚本工具
2022-04-07 08:00:16
![](https://img.aspxhome.com/file/2023/9/62159_0s.png)
使用Springboot 打jar包实现分离依赖lib和配置
2023-01-29 18:35:29
![](https://img.aspxhome.com/file/2023/7/76537_0s.png)
详解Maven私 服Nexus的安装与使用
2023-11-24 12:34:02
java 根据经纬度获取地址实现代码
2023-09-05 04:54:50
SpringBoot 应用程序测试实现方案
2021-12-18 04:27:54
![](https://img.aspxhome.com/file/2023/9/86729_0s.jpg)
SpringBoot过滤器与拦截器使用方法深入分析
2023-08-18 10:20:03
![](https://img.aspxhome.com/file/2023/3/84643_0s.png)
C# 删除字符串中的中文(实例分享)
2021-12-30 12:55:48
那些年,我还在学习C# 学习笔记
2021-11-09 07:08:35
![](https://img.aspxhome.com/file/2023/8/92968_0s.jpg)
Java 实战项目锤炼之网上花店商城的实现流程
2021-09-14 04:51:45
![](https://img.aspxhome.com/file/2023/4/108404_0s.png)
通过实例解析Spring argNames属性
2023-09-14 10:43:13
![](https://img.aspxhome.com/file/2023/0/58540_0s.jpg)
老生常谈 Java中的继承(必看)
2023-06-21 11:59:51
![](https://img.aspxhome.com/file/2023/2/80982_0s.jpg)