diff --git a/spring-boot-project/spring-boot-parent/pom.xml b/spring-boot-project/spring-boot-parent/pom.xml index beb06e0884..74a4f39921 100644 --- a/spring-boot-project/spring-boot-parent/pom.xml +++ b/spring-boot-project/spring-boot-parent/pom.xml @@ -29,7 +29,7 @@ 1.10.6 6.14.3 1.0.6.RELEASE - 0.1.0.RELEASE + 0.1.1.RELEASE https://github.com/spring-projects/spring-boot diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/AsciidocBuilder.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/AsciidocBuilder.java index 104fec4d86..5a51d84a69 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/AsciidocBuilder.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/AsciidocBuilder.java @@ -31,6 +31,18 @@ class AsciidocBuilder { this.content = new StringBuilder(); } + public AsciidocBuilder appendKey(Object... items) { + for (Object item : items) { + append("`+", item, "+` +", NEWLINE); + } + return this; + } + + public AsciidocBuilder newLine() { + append(NEWLINE); + return this; + } + public AsciidocBuilder appendln(Object... items) { append(items); append(NEWLINE); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntry.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntry.java index 1c58f2cc66..1711e52aa0 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntry.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntry.java @@ -46,10 +46,9 @@ class CompoundConfigurationTableEntry extends ConfigurationTableEntry { @Override public void write(AsciidocBuilder builder) { - builder.append("|`+++"); - this.configurationKeys.forEach(builder::appendln); - builder.appendln("+++`"); - builder.appendln("|"); + builder.append("|"); + this.configurationKeys.forEach(builder::appendKey); + builder.newLine().appendln("|"); builder.appendln("|+++", this.description, "+++"); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntryTests.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntryTests.java index 65a663630c..ac50091b53 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntryTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntryTests.java @@ -47,9 +47,10 @@ public class CompoundConfigurationTableEntryTests { entry.addConfigurationKeys(firstProp, secondProp, thirdProp); AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); - assertThat(builder.toString()).isEqualTo("|`+++spring.test.first" + NEWLINE - + "spring.test.second" + NEWLINE + "spring.test.third" + NEWLINE + "+++`" - + NEWLINE + "|" + NEWLINE + "|+++This is a description.+++" + NEWLINE); + assertThat(builder.toString()).isEqualTo( + "|`+spring.test.first+` +" + NEWLINE + "`+spring.test.second+` +" + + NEWLINE + "`+spring.test.third+` +" + NEWLINE + NEWLINE + "|" + + NEWLINE + "|+++This is a description.+++" + NEWLINE); } }