feign.FeignException
springboot继承feign报异常,以下两种异常
- feign.FeignException$InternalServerError: status 500 reading AccountFeign#decrease(Long,BigDecimal)
- feign.FeignException$BadRequest: status 400 reading AccountFeign#decrease(Long,BigDecimal)
异常原因:需要确认feignclient错误还是对应的controller方法执行有问题,先确保不使用feign的情况下接口是正常的
解决方法:
- 检查feign接口对应服务方法的controller的参数类型、请求路径是否对应,注解是否正确,请求方式比如GET是否允许
- 传递的参数可能controller不接受,比如考虑null空值接收问题
- 检查同名代码引入的包是否正确:eg: @param注解 在ibatis包和feign包中都存在,feignclient应使用feign包中的