Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: getSession failed and no fallback available.
解决方法:
@FeignClient(
name = "common-com",
configuration = {AuthFeignConfiguration.class}
)
在使用@FeignClient访问别的模块的时候,如果控制台还有其他报错信息,比如:
Caused by: java.lang.RuntimeException: com.netflix.client.ClientException: Load balancer does not have available server for client: common-com
那就说明是注册中心eureka-server没启动,application名字name为common-com的服务提供者无法向注册中心注册服务。
如果控制台还有其他报错信息,比如:
Caused by: feign.FeignException: status 404 reading SSOSessionFeignClient#gg(); content:
那就说明可以连接common-com服务,但所调用的请求路径是404,找不到。
本文链接:http://www.yayihouse.com/yayishuwu/chapter/1441