【发布时间】:2019-09-10 08:30:45
【问题描述】:
我在我的大学项目中使用带有 Hystrix 的 Spring Boot。 我遇到的问题是,当我将 Netflix Hystrix 依赖项添加到 pom.xml 文件并运行程序时,它会抛出一个名为 AbstractMethodError 的错误:null,但没有 Netflix Hystrix 依赖项的程序运行时没有任何错误。我该如何解决这个问题?
这些是我的依赖项
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
【问题讨论】:
-
你能发布堆栈跟踪吗?
-
java.lang.AbstractMethodError: null at org.springframework.core.OrderComparator.findOrder(OrderComparator.java:142) ~[spring-core-5.0.9.RELEASE.jar:5.0.9。 RELEASE] 在 org.springframework.core.annotation.AnnotationAwareOrderComparator.findOrder(AnnotationAwareOrderComparator.java:65) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE] 在 org.springframework.core.OrderComparator。 getOrder(OrderComparator.java:125) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.core.OrderComparator.getOrder(OrderComparator.java:113) ~[spring-core -5.0.9.RELEASE.jar:5.0.9.RELEASE] 在
标签: spring-boot spring-cloud spring-cloud-netflix hystrix