Merge branch '2.2.x' into 2.3.x
Closes gh-23598
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user