The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true)

 

springCloud项目中使用feign时报错

原因是因为在项目中导入的jar的问题

原来的依赖
     <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-openfeign-core</artifactId>
        </dependency>
修改后的依赖
      <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Finchley.M8</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
            <version>2.0.0.RC1</version>
        </dependency>    

 

posted @ 2021-05-08 17:02  皮军旗  阅读(10125)  评论(0)    收藏  举报