spring-boot - SpringBoot : can't create fully executable jar with 2. 0.0-M3

标签 spring-boot gradle jar executable-jar

我有一个多模块 Gradle 项目,我尝试升级到 2.0.0-M3。
按照说明here ,我将此添加到我的构建脚本中:

springBoot {
    executable = true
}

但是当我构建时,我收到以下错误:
Could not set unknown property 'executable' for object of type org.springframework.boot.gradle.dsl.SpringBootExtension.

是里程碑中的问题还是我做错了什么?

最佳答案

Spring Boot 2.0 中对此的配置已更改。而不是在 springBoot 上配置它扩展名,现在是 configured on an individual BootJar or BootWar task .例如:

bootJar {
    launchScript {
        included = true
    }
}

从 Spring Boot 2.0 M4 开始,这个配置得到了进一步的简化:
bootJar {
    launchScript()
}

您可能需要打开一个问题来更正您链接到的文档,因为它已过期。

关于spring-boot - SpringBoot : can't create fully executable jar with 2. 0.0-M3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45455890/

相关文章:

java - spring boot maven没有将jsp文件打包到 "fat jar"

java - Maven:没有要安装的主要 Artifact ,而是安装附加 Artifact

java - SpringBoot 多数据源 - 仅在外部 Tomcat 容器中失败

java - 如何在jpa存储库中使用jsonb_set来传递动态字符串?

java - 详细信息表单上用户导航的最佳策略

Grails 3.2.4 : custom authentication filter not called

android - 当同一个 .jar 是应用程序和模块的依赖项时出现 "More than one file was found with OS independent path"错误

java - Gradle with ajc 不读取 Lombok 注释

android - 如何在Android Studio中为APK构建获取正确的gradle.startParameter.taskNames

java - 正确使用java Commons BeanUtils?