新しいバージョンの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>
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:
コンソール:春ブーツ1.4.1.RELEASEで作業する場合、彼らはBanner.Mode bannerMode
は、どちらかのために列挙型を期待
new SpringApplicationBuilder().showBanner()
new SpringApplicationBuilder().bannerMode(Banner.Mode bannerMode)
からそれを変更した0
@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"ファイルを追加しました。 :-) –