Fork me on GitHub

Feign调用全局异常处理解决

异常信息形如:TestService#addRecord(ParamVO) failed and no fallback available.; 对于failed and no fallback available.这种异常信息,是因为项目开启了熔断: 1feign.hystrix.enabled: true 当调用服务时抛出了异常,却没有定义fallback方法,就会抛出上述异常。由此引...

Feign设置assessToken

首先继承接口RequestInterceptor实现apply方法 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframew...