sách gpt4 ai đã đi

java - 1.3.7.发布 -> 1.4.1.发布 | java.lang.NoSuchMethodError : org. springframework.boot.builder.SpringApplicationBuilder.showBanner 错误

In lại 作者:塔克拉玛干 更新时间:2023-11-03 03:41:30 25 4
mua khóa gpt4 Nike

如果我切换到新版本的SpringBoot,我在启动应用程序时会得到上面的错误信息。这是为什么?

最美好的祝愿史蒂文

pom.xml



xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0

de.xyz.microservice
spring-boot-test
1.0-SNAPSHOT


org.springframework.boot
spring-boot-starter-parent

1.4.1.RELEASE



org.springframework.boot
spring-boot-starter-web




堆栈跟踪:

Exception in thread "main" java.lang.NoSuchMethodError:
org.springframework.boot.builder.SpringApplicationBuilder.showBanner(Z)Lorg/springframework/boot/builder/SpringApplicationBuilder;
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:109)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:75)...

主类:

@SpringBootỨng dụng
@ComponentScan(value = "de.xyzs.microservice")
@EnableAspectJAutoProxy(proxyTargetClass = true)

public class MainClass {

public static void main(String[] args) {
SpringApplication.run(MainClass.class, args);
}
}

1 Câu trả lời

我能够通过显式声明适用于版本 1.4.4 的云上下文依赖关系来解决此问题

    
org.springframework.cloud
spring-cloud-context
1.1.8.RELEASE

关于java - 1.3.7.发布 -> 1.4.1.发布 | java.lang.NoSuchMethodError : org. springframework.boot.builder.SpringApplicationBuilder.showBanner 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40258498/

25 4 0
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com