引用fegin报错
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.betterwood.common.config.feign.FeignConfigure.options(FeignConfigure.java:37)
The following method did not exist:
feign.Request$Options.<init>(JLjava/util/concurrent/TimeUnit;JLjava/util/concurrent/TimeUnit;Z)V
The method's class, feign.Request$Options, is available from the following locations:
jar:file:/E:/maven-3.8.1/repository/io/github/openfeign/feign-core/10.4.0/feign-core-10.4.0.jar!/feign/Request$Options.class
The class hierarchy was loaded from the following locations:
feign.Request.Options: file:/E:/maven-3.8.1/repository/io/github/openfeign/feign-core/10.4.0/feign-core-10.4.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of feign.Request$Options
版本冲突
我的springboot 版本是2.3.7.RELEASE,springcloud版本是Hoxton.RELEASE
去除10.4.0版本
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<exclusions>
<exclusion>
<artifactId>feign-core</artifactId>
<groupId>io.github.openfeign</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
单独增加10.5.1版本
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-core</artifactId>
<version>10.5.1</version>
</dependency>
注意pom中有没有排除ribbon的,要删除
查看配置文件,是否有进行feign单独处理的,如feign超时调用