Nếu tôi chuyển sang phiên bản mới của SpringBoot, tôi nhận được thông báo lỗi trên khi khởi động ứng dụng. Tại sao vậy?1.3.7.RELEASE -> 1.4.1.RELEASE | java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.showBanner
Best wishes Steven
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
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">
<modelVersion>4.0.0</modelVersion>
<groupId>de.xyz.microservice</groupId>
<artifactId>spring-boot-test</artifactId>
<version>1.0-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<!--version>1.3.7.RELEASE</version-->
<version>1.4.1.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
</project>
stacktrace:
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)...
MainClass:
@SpringBootApplication
@ComponentScan(value = "de.xyzs.microservice")
@EnableAspectJAutoProxy(proxyTargetClass = true)
public class MainClass {
public static void main(String[] args) {
SpringApplication.run(MainClass.class, args);
}
}
Vui lòng thêm các chi tiết khác. –
Tin nhắn ngoại lệ khá rõ ràng ... Bạn có điều gì 'NoSuchMethodError' là gì? ... –
Tôi đã thêm tệp "pom.xml". :-) –