如果我切换到新版本的SpringBoot,当启动应用程序时,我得到上述错误信息。 这是为什么?1.3.7.RELEASE - > 1.4.1.RELEASE | java.lang.NoSuchMethodError:org.springframework.boot.builder.SpringApplicationBuilder.showBanner
祝 史蒂芬
的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>
堆栈跟踪:
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);
}
}
请填写更多详情。 –
那么这个异常消息是非常清晰的......你有什么'NoSuchMethodError'是什么? ... –
我已经添加了“pom.xml”文件。 :-) –