Spring boot excludeDevtools在Spring Boot 1.5.1.RELEASE下似乎没有效果(但在1.4.4.RELEASE中没有问题)

Spring boot excludeDevtools在Spring Boot 1.5.1.RELEASE下似乎没有效果(但在1.4.4.RELEASE中没有问题),spring-boot,Spring Boot,我创建了一个全新的Spring Boot 1.5.1.RELEASE项目,该项目具有devtools依赖项: dependencies { compile('org.springframework.boot:spring-boot-starter-thymeleaf') compile('org.springframework.boot:spring-boot-starter-web') compile('org.springframework.boot:spring-b

我创建了一个全新的Spring Boot 1.5.1.RELEASE项目,该项目具有devtools依赖项:

dependencies {
    compile('org.springframework.boot:spring-boot-starter-thymeleaf')
    compile('org.springframework.boot:spring-boot-starter-web')
    compile('org.springframework.boot:spring-boot-devtools')
    testCompile('org.springframework.boot:spring-boot-starter-test')
}
当从内部想法运行时,这没有问题。但是,在执行bootRepackage之后,生成的fat jar的lib文件夹中没有devtools jar。我在build.gradle中有以下条目:

bootRepackage {     
    mainClass = 'com.example.HotreloadApplication'
    excludeDevtools = false 
}
springBoot {
    excludeDevtools = false
}
在一个./gradlew bootRepackage和一个java-jar构建/libs/hotreload-0.0.1-SNAPSHOT.jar之后,我可以看到它仍然在没有devtools的情况下启动。打开罐子时,我还可以看到它没有包括在内

然而,当将springBootVersion移回“1.4.4.RELEASE”时,一切都完全按照预期运行

任何帮助都将不胜感激!我已经在下面的消息中包含了build.gradle的全部内容

非常感谢,, 邓肯

---格雷德尔先生--

buildscript {
    ext {
        springBootVersion = '1.5.1.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'

jar {
    baseName = 'hotreload'
    version = '0.0.1-SNAPSHOT'
}

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}


dependencies {
    compile('org.springframework.boot:spring-boot-starter-thymeleaf')
    compile('org.springframework.boot:spring-boot-starter-web')
    compile('org.springframework.boot:spring-boot-devtools')
    testCompile('org.springframework.boot:spring-boot-starter-test')
}

bootRepackage {
    mainClass = 'com.example.HotreloadApplication'
    excludeDevtools = false
}

这个问题被作者交叉发布的问题所取代。

没错,谢谢Stephane。通过将以下块添加到build.gradle,github票证上发布了一个解决方案:

bootRepackage {     
    mainClass = 'com.example.HotreloadApplication'
    excludeDevtools = false 
}
springBoot {
    excludeDevtools = false
}
如果运气好的话,这个错误应该在1.5.2中修复

非常感谢,, 邓肯