Spring Boot 1.3.7から1.4.0にアップグレードした後、Spring Boot Mavenプラグインを使用して単一のjarビルドとしてアプリケーションを起動できなくなりました。私たちのアプリケーションは、JerseyとJettyを使用する小さなRESTインターフェイスです。私たちはMavenを使い、私たちのpomファイルはかなり標準のSpring Bootです。Spring Boot 1.3.7から1.4.0へのアップグレード後にSIngle jarの起動に失敗しました
mvn spring-boot:run
を使用してアプリケーションを実行することはできますが、Eclipse内では1つのjarファイルとして実行すると、ResourceFinder
は.jar!/BOOT-INF/classes
が見つからないと訴えます。
jarを解凍すると、フォルダBOOT-INF/classes
が存在し、予想されるクラスとリソースが含まれています。
助けてください。 Spring Boot 1.4 release notesから
2016-08-10 14:58:31.162 ERROR 16071 --- [ main] o.s.boot.SpringApplication
: Application startup failed
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'jerseyConfig' defined in URL
[jar:file:/acmesource/acme/acme-core/acme-core-api/target/acme-core-api-0.1
SNAPSHOT.jar!/BOOT-INF/classes!/com/acme/core/api/JerseyConfig.class]: Bean
instantiation via constructor failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[com.acme.core.api.JerseyConfig]: Constructor threw exception; nested
exception is
org.glassfish.jersey.server.internal.scanning.ResourceFinderException:
java.io.FileNotFoundException: /acmesource/acme/acme-core/acme-core
api/target/acme-core-api-0.1-SNAPSHOT.jar!/BOOT-INF/classes (No such file or directory)
ありがとうございます!それを逃した。リソースが個別に登録されている場合に機能します。 – oleb
@olebあなたは私の一日を救った!ありがとう –