bubbleshadow% ls -l build/libs
total 83544
-rw-r--r--  1 dlynch  staff  42772394 May 14 08:37 bubbleshadow-0.0.1-SNAPSHOT.jar

运行上面的.jar文件(应该是一个胖jar)时,我收到以下错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path res
ource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

我试图按照以下说明操作:https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/html/

在8.1中它说反应(原文如此)到Java插件:

然后:

创建一个名为bootJar的BootJar任务,它将为项目创建一个可执行文件(sic),胖jar .

我的构建在IntelliJ IDEA中运行,但在命令行上执行时则不行 .

根据Josh Long的书本学习Spring Boot 2.0 - 第二版,看到它说:

If we peek at the output, we'll find the original JAR file (non-FAT) along with the rebundled one containing our application code as well as the third-party dependencies, as shown here: $ ls build/libs
learning-spring-boot-0.0.1-SNAPSHOT.jar
learning-spring-boot-0.0.1-SNAPSHOT.jar.original

Turnquist,Greg L ..学习Spring Boot 2.0 - 第二版:简化基于微服务和反应式编程的闪电快速应用程序的开发(Kindle Locations 664-667( sic )) . Packt Publishing . Kindle版 .

我不明白为什么没有 生产环境 .original jar而且它为我 生产环境 的 jar 是不可运行的 .