org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'memberController': Unsatisfied dependency expressed through field 'memberCoupons'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.mall.piaopiaomall.member.feign.MemberCoupons': Unexpected exception during bean creation; nested exception is java.lang.IllegalStateException: No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalancer?
利用feign远程调用,启动项目是出现上面错误
是因为没有配置spring-cloud-starter-loadbalancer依赖
在pom.xml文件中加入依赖即可
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-loadbalancer</artifactId>
</dependency>