在项目中用OpenFeign做生产者调用,结果消费者调用失败,并报出如下错误:
XXXX 14:11:59.302 ERROR 19596 --- [io
-10000-exec
-1] o
.a
.c
.c
.C.[.[.[/].[dispatcherServlet
] : Servlet
.service() for servlet
[dispatcherServlet
] in context
with path
[] threw exception
[Request processing failed
; nested exception is feign
.FeignException$InternalServerError
: status
500 reading CouponFeignService#
saveSpuBounds(SpuBoundsTo
)] with root cause
feign
.FeignException$InternalServerError
: status
500 reading
...
.......
断点调试后确认业务逻辑和url等路径都没有问题 后发现原因是消费者的调用接口没有交给Spring管理,给接口加上相应的@Component注解,问题解决
附
之后在另一个项目的一次测试中又遇到了这个异常,最后发现原因是远程调用的方法有问题,此时生产者模块应该会报出相应异常,之后修正方法即可,在此记录一下