【发布时间】:2026-01-15 19:10:02
【问题描述】:
我开始调查将 Spring Boot 应用程序从 1.5.x 迁移到 2。 这个应用程序依赖于 hystrix,它还不兼容 Spring Boot 2。 当我的 pom 中有以下内容时:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
<version>1.4.4.RELEASE</version>
</dependency>
启动应用程序时出现以下错误:
java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:125)
有人有过同样的经历吗? 有解决办法了吗?
【问题讨论】:
-
从依赖中移除
<version>标签。 -
这并没有解决。
标签: spring-boot hystrix