Merge branch '2.2.x' into 2.3.x

Closes gh-23598
This commit is contained in:
Andy Wilkinson
2020-10-06 14:35:49 +01:00
4 changed files with 78 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
plugins {
id 'java'
id 'org.springframework.boot' version '{version}'
}
// tag::system-property[]
bootRun {
systemProperty 'com.example.property', findProperty('example') ?: 'default'
}
// end::system-property[]
task configuredSystemProperties {
doLast {
bootRun.systemProperties.each { k, v ->
println "$k = $v"
}
}
}

View File

@@ -0,0 +1,20 @@
import org.springframework.boot.gradle.tasks.run.BootRun
plugins {
java
id("org.springframework.boot") version "{version}"
}
// tag::system-property[]
tasks.getByName<BootRun>("bootRun") {
systemProperty("com.example.property", findProperty("example") ?: "default")
}
// end::system-property[]
task("configuredSystemProperties") {
doLast {
tasks.getByName<BootRun>("bootRun").systemProperties.forEach { k, v ->
println("$k = $v")
}
}
}