From 793a107d27308ae172cd976da3242fcf37faadf8 Mon Sep 17 00:00:00 2001 From: Weix Sun Date: Sun, 14 Nov 2021 14:50:38 +0800 Subject: [PATCH 1/2] Fix yaml sample format in reference doc See gh-28670 --- .../src/docs/asciidoc/features/external-config.adoc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc index 0cddaefd200..6fc676b7a88 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc @@ -470,10 +470,16 @@ For example, the following file has two logical documents: [source,yaml,indent=0,subs="verbatim"] ---- - spring.application.name: MyApp + spring: + application: + name: "MyApp" --- - spring.config.activate.on-cloud-platform: kubernetes - spring.application.name: MyCloudApp + spring: + application: + name: "MyCloudApp" + config: + activate: + on-cloud-platform: kubernetes ---- For `application.properties` files a special `#---` comment is used to mark the document splits: From 6d79599d99b6a503121338c42badcf9deb087931 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 16 Nov 2021 08:47:53 +0100 Subject: [PATCH 2/2] Polish "Fix yaml sample format in reference doc" See gh-28670 --- .../src/docs/asciidoc/features/external-config.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc index 6fc676b7a88..df6a2d4955c 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc @@ -472,11 +472,11 @@ For example, the following file has two logical documents: ---- spring: application: - name: "MyApp" + name: MyApp --- spring: application: - name: "MyCloudApp" + name: MyCloudApp config: activate: on-cloud-platform: kubernetes @@ -488,8 +488,8 @@ For `application.properties` files a special `#---` comment is used to mark the ---- spring.application.name=MyApp #--- - spring.config.activate.on-cloud-platform=kubernetes spring.application.name=MyCloudApp + spring.config.activate.on-cloud-platform=kubernetes ---- NOTE: Property file separators must not have any leading whitespace and must have exactly three hyphen characters.