mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Merge pull request #33424 from candrews
* 33424: Update instead of replace environment in bootBuildImage documentation Closes gh-33424
This commit is contained in:
commit
39a026ed65
@ -5,10 +5,8 @@ plugins {
|
||||
|
||||
// tag::env[]
|
||||
tasks.named("bootBuildImage") {
|
||||
environment = [
|
||||
"HTTP_PROXY" : "http://proxy.example.com",
|
||||
"HTTPS_PROXY": "https://proxy.example.com"
|
||||
]
|
||||
environment["HTTP_PROXY"] = "http://proxy.example.com"
|
||||
environment["HTTPS_PROXY"] = "https://proxy.example.com"
|
||||
}
|
||||
// end::env[]
|
||||
|
||||
|
@ -9,10 +9,8 @@ tasks.named("bootJar") {
|
||||
|
||||
// tag::env-runtime[]
|
||||
tasks.named("bootBuildImage") {
|
||||
environment = [
|
||||
"BPE_DELIM_JAVA_TOOL_OPTIONS" : " ",
|
||||
"BPE_APPEND_JAVA_TOOL_OPTIONS" : "-XX:+HeapDumpOnOutOfMemoryError"
|
||||
]
|
||||
environment["BPE_DELIM_JAVA_TOOL_OPTIONS"] = " "
|
||||
environment["BPE_APPEND_JAVA_TOOL_OPTIONS"] = "-XX:+HeapDumpOnOutOfMemoryError"
|
||||
}
|
||||
// end::env-runtime[]
|
||||
|
||||
|
@ -5,7 +5,7 @@ plugins {
|
||||
|
||||
// tag::env[]
|
||||
tasks.named("bootBuildImage") {
|
||||
environment = ["BP_JVM_VERSION" : "17"]
|
||||
environment["BP_JVM_VERSION"] = "17"
|
||||
}
|
||||
// end::env[]
|
||||
|
||||
|
@ -7,7 +7,7 @@ plugins {
|
||||
|
||||
// tag::env[]
|
||||
tasks.named<BootBuildImage>("bootBuildImage") {
|
||||
environment.set(mapOf("BP_JVM_VERSION" to "17"))
|
||||
environment.set(environment.get() + mapOf("BP_JVM_VERSION" to "17"))
|
||||
}
|
||||
// end::env[]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user