检查该子服务的依赖
在子服务的pom.xml文件中写入如下内容
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
注意点:
需要写在<dependencies></dependencies>中
写完需要更新pom.xml(点击m的圆形图标)
回到启动文件Application中重新引入程序包
import org.springframework.cloud.openfeign.EnableFeignClients;
导入成功