您的位置: 首页 > 文章 > com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.lxw com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.lxw 分类: 文章 • 2025-03-23 19:44:58 使用Feign是出现的问题 SpringCloud对Feign进行了增强兼容了SpringMVC的注解 ,我们在使用SpringMVC的注解时需要注意: 1、feignClient接口 有参数在参数必须加@PathVariable(“XXX”)和@RequestParam(“XXX”) 2、feignClient返回值为复杂对象时其类型必须有无参构造函数。 按住ctrl点击打开 返回值类型 类。 1.在返回值类型中加上@NoArgsConstructor注解 2.进行序列化,方便传输