We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cca6d81 commit ec3041eCopy full SHA for ec3041e
III. Using Spring Boot/20. Developer tools.md
@@ -17,3 +17,4 @@ dependencies {
17
compile("org.springframework.boot:spring-boot-devtools")
18
}
19
```
20
+**注** 在运行一个完整的,打包过的应用时,开发者工具(devtools)会被自动禁用。如果应用使用`java -jar`或特殊的类加载器启动,都会被认为是一个产品级的应用(production application),从而禁用开发者工具。为了防止devtools传递到项目中的其他模块,设置该依赖级别为optional是个不错的实践。不过Gradle不支持`optional`依赖,所以你可能要了解下[propdeps-plugin](https://github.com/spring-projects/gradle-plugins/tree/master/propdeps-plugin)。如果想确保devtools绝对不会包含在一个产品级构建中,你可以使用`excludeDevtools`构建属性彻底移除该JAR,Maven和Gradle都支持该属性。
0 commit comments