我正在尝试运行样本中https://github.com/dsyer/spring-boot-thin-launcher处的simple
应用,在执行mvn clean install
并运行java -jar simple-0.0.1-SNAPSHOT
后,我得到以下堆栈跟踪。< / p>
Exception in thread "main" java.lang.IllegalStateException: Cannot locate library: C:\Users\username/.m2/repository/org/springframework/boot/experimental/spring-boot-thin-launcher/1.0.9.RELEASE/spring-boot-thin-launcher-1.0.9.RELEASE-exec.jar
at org.springframework.boot.loader.wrapper.ThinJarWrapper.launch(ThinJarWrapper.java:113)
at org.springframework.boot.loader.wrapper.ThinJarWrapper.main(ThinJarWrapper.java:90)
正如您所看到的,我正在尝试使用最新的1.0.9.RELEASE(这是我对源代码所做的唯一更改)。所以,然后我尝试执行java -jar simple-0.0.1-SNAPSHOT.jar --thin.library=org.springframework.boot.experimental:spring-boot-thin-launcher:1.0.9.RELEASE
并得到以下堆栈跟踪。
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/loader/ExecutableArchiveLauncher
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.springframework.boot.loader.wrapper.ThinJarWrapper.launch(ThinJarWrapper.java:117)
at org.springframework.boot.loader.wrapper.ThinJarWrapper.main(ThinJarWrapper.java:90)
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.loader.ExecutableArchiveLauncher
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 13 more
我以为我按照https://github.com/dsyer/spring-boot-thin-launcher提供的说明运行示例。
我错过了什么?
答案 0 :(得分:0)
将您的Spring Boot Think版本更新为1.0.24.RELEASE
,并遵循其存储库中的新文档:
https://github.com/spring-projects-experimental/spring-boot-thin-launcher