Skip to content

Commit ea064ce

Browse files
committed
Merge pull request #28670 from weixsun
* pr/28670: Polish "Fix yaml sample format in reference doc" Fix yaml sample format in reference doc Closes gh-28670
2 parents 7f4c8aa + 6d79599 commit ea064ce

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,16 @@ For example, the following file has two logical documents:
470470

471471
[source,yaml,indent=0,subs="verbatim"]
472472
----
473-
spring.application.name: MyApp
473+
spring:
474+
application:
475+
name: MyApp
474476
---
475-
spring.config.activate.on-cloud-platform: kubernetes
476-
spring.application.name: MyCloudApp
477+
spring:
478+
application:
479+
name: MyCloudApp
480+
config:
481+
activate:
482+
on-cloud-platform: kubernetes
477483
----
478484

479485
For `application.properties` files a special `#---` comment is used to mark the document splits:
@@ -482,8 +488,8 @@ For `application.properties` files a special `#---` comment is used to mark the
482488
----
483489
spring.application.name=MyApp
484490
#---
485-
spring.config.activate.on-cloud-platform=kubernetes
486491
spring.application.name=MyCloudApp
492+
spring.config.activate.on-cloud-platform=kubernetes
487493
----
488494

489495
NOTE: Property file separators must not have any leading whitespace and must have exactly three hyphen characters.

0 commit comments

Comments
 (0)