From 52d9ba58d8f02d87bd043962116ee22cfa7d1729 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Mon, 7 Feb 2022 11:09:53 +0100 Subject: [PATCH] Move appendix subsections under appendix section This involved a small code change to the generated configuration properties snippets. The section id has to start with 'appendix.', otherwise the section-id asciidoctor extension complains. To ensure that the anchors that are derived from the section IDs remain backwards compatible, the anchor-rewrite properties have been updated. See gh-29667 --- .../build/context/properties/Snippets.java | 4 +- .../docs/asciidoc/anchor-rewrite.properties | 219 ++++++++++++------ .../docs/asciidoc/application-properties.adoc | 2 +- .../asciidoc/auto-configuration-classes.adoc | 2 +- .../auto-configuration-classes/actuator.adoc | 2 +- .../auto-configuration-classes/core.adoc | 2 +- .../other-build-systems.adoc | 2 +- .../build-tool-plugins/whats-next.adoc | 2 +- .../src/docs/asciidoc/cli/using-the-cli.adoc | 2 +- .../docs/asciidoc/configuration-metadata.adoc | 4 +- .../annotation-processor.adoc | 14 +- .../configuration-metadata/format.adoc | 10 +- .../configuration-metadata/manual-hints.adoc | 22 +- .../docs/asciidoc/dependency-versions.adoc | 2 +- .../dependency-versions/coordinates.adoc | 2 +- .../dependency-versions/properties.adoc | 2 +- .../docs/asciidoc/documentation/advanced.adoc | 2 +- .../src/docs/asciidoc/executable-jar.adoc | 2 +- .../asciidoc/executable-jar/alternatives.adoc | 2 +- .../executable-jar/jarfile-class.adoc | 4 +- .../asciidoc/executable-jar/launching.adoc | 4 +- .../asciidoc/executable-jar/nested-jars.adoc | 12 +- .../executable-jar/property-launcher.adoc | 2 +- .../asciidoc/executable-jar/restrictions.adoc | 6 +- .../developing-auto-configuration.adoc | 2 +- .../features/developing-web-applications.adoc | 2 +- .../asciidoc/features/external-config.adoc | 4 +- .../src/docs/asciidoc/features/kotlin.adoc | 2 +- .../src/docs/asciidoc/features/messaging.adoc | 2 +- .../src/docs/asciidoc/features/testing.adoc | 28 +-- .../getting-started/first-application.adoc | 2 +- .../src/docs/asciidoc/howto/build.adoc | 2 +- .../howto/properties-and-configuration.adoc | 2 +- .../src/docs/asciidoc/howto/webserver.adoc | 2 +- .../src/docs/asciidoc/index.adoc | 12 +- .../src/docs/asciidoc/index.singleadoc | 12 +- .../asciidoc/test-auto-configuration.adoc | 2 +- .../test-auto-configuration/slices.adoc | 2 +- 38 files changed, 237 insertions(+), 166 deletions(-) diff --git a/buildSrc/src/main/java/org/springframework/boot/build/context/properties/Snippets.java b/buildSrc/src/main/java/org/springframework/boot/build/context/properties/Snippets.java index 79d78f09f3..35a310e3f7 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/context/properties/Snippets.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/context/properties/Snippets.java @@ -90,7 +90,9 @@ class Snippets { private Asciidoc getAsciidoc(Snippet snippet, Table table) { Asciidoc asciidoc = new Asciidoc(); - asciidoc.appendln("[[" + snippet.getAnchor() + "]]"); + // We have to prepend 'appendix.' as a section id here, otherwise the + // spring-asciidoctor-extensions:section-id asciidoctor extension complains + asciidoc.appendln("[[appendix." + snippet.getAnchor() + "]]"); asciidoc.appendln("== ", snippet.getTitle()); table.write(asciidoc); return asciidoc; diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties index e878d84c50..589cc04cb8 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties @@ -703,78 +703,147 @@ howto-convert-an-existing-application-to-spring-boot=howto.traditional-deploymen howto-weblogic=howto.traditional-deployment.weblogic howto-use-jedis-instead-of-lettuce=howto.nosql.jedis-instead-of-lettuce howto-testcontainers=howto.testing.testcontainers -common-application-properties=application-properties -common-application-properties-core=application-properties.core -common-application-properties-cache=application-properties.cache -common-application-properties-mail=application-properties.mail -common-application-properties-json=application-properties.json -common-application-properties-data=application-properties.data -common-application-properties-transaction=application-properties.transaction -common-application-properties-data-migration=application-properties.data-migration -common-application-properties-integration=application-properties.integration -common-application-properties-web=application-properties.web -common-application-properties-templating=application-properties.templating -common-application-properties-server=application-properties.server -common-application-properties-security=application-properties.security -common-application-properties-rsocket=application-properties.rsocket -common-application-properties-actuator=application-properties.actuator -common-application-properties-devtools=application-properties.devtools -common-application-properties-testing=application-properties.testing -configuration-metadata=configuration-metadata -configuration-metadata-format=configuration-metadata.format -configuration-metadata-group-attributes=configuration-metadata.format.group -configuration-metadata-property-attributes=configuration-metadata.format.property -configuration-metadata-hints-attributes=configuration-metadata.format.hints -configuration-metadata-repeated-items=configuration-metadata.format.repeated-items -configuration-metadata-providing-manual-hints=configuration-metadata.manual-hints -configuration-metadata-providing-manual-hints-value-hint=configuration-metadata.manual-hints.value-hint -configuration-metadata-providing-manual-hints-value-providers=configuration-metadata.manual-hints.value-providers -configuration-metadata-providing-manual-hints-any=configuration-metadata.manual-hints.value-providers.any -configuration-metadata-providing-manual-hints-class-reference=configuration-metadata.manual-hints.value-providers.class-reference -configuration-metadata-providing-manual-hints-handle-as=configuration-metadata.manual-hints.value-providers.handle-as -configuration-metadata-providing-manual-hints-logger-name=configuration-metadata.manual-hints.value-providers.logger-name -configuration-metadata-providing-manual-hints-spring-bean-reference=configuration-metadata.manual-hints.value-providers.spring-bean-reference -configuration-metadata-providing-manual-hints-spring-profile-name=configuration-metadata.manual-hints.value-providers.spring-profile-name -configuration-metadata-annotation-processor=configuration-metadata.annotation-processor -configuration-metadata-annotation-processor-setup=configuration-metadata.annotation-processor.configuring -configuration-metadata-annotation-processor-metadata-generation=configuration-metadata.annotation-processor.automatic-metadata-generation -configuration-metadata-annotation-processor-metadata-generation-nested=configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties -configuration-metadata-additional-metadata=configuration-metadata.annotation-processor.adding-additional-metadata -auto-configuration-classes=auto-configuration-classes -auto-configuration-classes-from-autoconfigure-module=auto-configuration-classes.core -auto-configuration-classes-from-actuator=auto-configuration-classes.actuator -test-auto-configuration=test-auto-configuration -test-auto-configuration-slices=test-auto-configuration.slices -executable-jar=executable-jar -executable-jar-nested-jars=executable-jar.nested-jars -executable-jar-jar-file-structure=executable-jar.nested-jars.jar-structure -executable-jar-war-file-structure=executable-jar.nested-jars.war-structure -executable-jar-war-index-files=executable-jar.nested-jars.index-files -executable-jar-war-index-files-classpath=executable-jar.nested-jars.classpath-index -executable-jar-war-index-files-layers=executable-jar.nested-jars.layer-index -executable-jar-jarfile=executable-jar.jarfile-class -executable-jar-jarfile-compatibility=executable-jar.jarfile-class.compatibility -executable-jar-launching=executable-jar.launching -executable-jar-launcher-manifest=executable-jar.launching.manifest -executable-jar-property-launcher-features=executable-jar.property-launcher -executable-jar-restrictions=executable-jar.restrictions -executable-jar-alternatives=executable-jar.alternatives -dependency-versions=dependency-versions -dependency-versions-coordinates=dependency-versions.coordinates -dependency-versions-properties=dependency-versions.properties -core-properties=application-properties.core -cache-properties=application-properties.cache -mail-properties=application-properties.mail -json-properties=application-properties.json -data-properties=application-properties.data -transaction-properties=application-properties.transaction -data-migration-properties=application-properties.data-migration -integration-properties=application-properties.integration -web-properties=application-properties.web -templating-properties=application-properties.templating -server-properties=application-properties.server -security-properties=application-properties.security -rsocket-properties=application-properties.rsocket -actuator-properties=application-properties.actuator -devtools-properties=application-properties.devtools -testing-properties=application-properties.testing + +# Appendix restructuring, see gh-27003 +common-application-properties=appendix.application-properties +common-application-properties-core=appendix.application-properties.core +common-application-properties-cache=appendix.application-properties.cache +common-application-properties-mail=appendix.application-properties.mail +common-application-properties-json=appendix.application-properties.json +common-application-properties-data=appendix.application-properties.data +common-application-properties-transaction=appendix.application-properties.transaction +common-application-properties-data-migration=appendix.application-properties.data-migration +common-application-properties-integration=appendix.application-properties.integration +common-application-properties-web=appendix.application-properties.web +common-application-properties-templating=appendix.application-properties.templating +common-application-properties-server=appendix.application-properties.server +common-application-properties-security=appendix.application-properties.security +common-application-properties-rsocket=appendix.application-properties.rsocket +common-application-properties-actuator=appendix.application-properties.actuator +common-application-properties-devtools=appendix.application-properties.devtools +common-application-properties-testing=appendix.application-properties.testing + +application-properties=appendix.application-properties +application-properties.core=appendix.application-properties.core +application-properties.cache=appendix.application-properties.cache +application-properties.mail=appendix.application-properties.mail +application-properties.json=appendix.application-properties.json +application-properties.data=appendix.application-properties.data +application-properties.transaction=appendix.application-properties.transaction +application-properties.data-migration=appendix.application-properties.data-migration +application-properties.integration=appendix.application-properties.integration +application-properties.web=appendix.application-properties.web +application-properties.templating=appendix.application-properties.templating +application-properties.server=appendix.application-properties.server +application-properties.security=appendix.application-properties.security +application-properties.rsocket=appendix.application-properties.rsocket +application-properties.actuator=appendix.application-properties.actuator +application-properties.devtools=appendix.application-properties.devtools +application-properties.testing=appendix.application-properties.testing + +core-properties=appendix.application-properties.core +cache-properties=appendix.application-properties.cache +mail-properties=appendix.application-properties.mail +json-properties=appendix.application-properties.json +data-properties=appendix.application-properties.data +transaction-properties=appendix.application-properties.transaction +data-migration-properties=appendix.application-properties.data-migration +integration-properties=appendix.application-properties.integration +web-properties=appendix.application-properties.web +templating-properties=appendix.application-properties.templating +server-properties=appendix.application-properties.server +security-properties=appendix.application-properties.security +rsocket-properties=appendix.application-properties.rsocket +actuator-properties=appendix.application-properties.actuator +devtools-properties=appendix.application-properties.devtools +testing-properties=appendix.application-properties.testing + +configuration-metadata=appendix.configuration-metadata +configuration-metadata-format=appendix.configuration-metadata.format +configuration-metadata-group-attributes=appendix.configuration-metadata.format.group +configuration-metadata-property-attributes=appendix.configuration-metadata.format.property +configuration-metadata-hints-attributes=appendix.configuration-metadata.format.hints +configuration-metadata-repeated-items=appendix.configuration-metadata.format.repeated-items +configuration-metadata-providing-manual-hints=appendix.configuration-metadata.manual-hints +configuration-metadata-providing-manual-hints-value-hint=appendix.configuration-metadata.manual-hints.value-hint +configuration-metadata-providing-manual-hints-value-providers=appendix.configuration-metadata.manual-hints.value-providers +configuration-metadata-providing-manual-hints-any=appendix.configuration-metadata.manual-hints.value-providers.any +configuration-metadata-providing-manual-hints-class-reference=appendix.configuration-metadata.manual-hints.value-providers.class-reference +configuration-metadata-providing-manual-hints-handle-as=appendix.configuration-metadata.manual-hints.value-providers.handle-as +configuration-metadata-providing-manual-hints-logger-name=appendix.configuration-metadata.manual-hints.value-providers.logger-name +configuration-metadata-providing-manual-hints-spring-bean-reference=appendix.configuration-metadata.manual-hints.value-providers.spring-bean-reference +configuration-metadata-providing-manual-hints-spring-profile-name=appendix.configuration-metadata.manual-hints.value-providers.spring-profile-name +configuration-metadata-annotation-processor=appendix.configuration-metadata.annotation-processor +configuration-metadata-annotation-processor-setup=appendix.configuration-metadata.annotation-processor.configuring +configuration-metadata-annotation-processor-metadata-generation=appendix.configuration-metadata.annotation-processor.automatic-metadata-generation +configuration-metadata-annotation-processor-metadata-generation-nested=appendix.configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties +configuration-metadata-additional-metadata=appendix.configuration-metadata.annotation-processor.adding-additional-metadata + +configuration-metadata.format=appendix.configuration-metadata.format +configuration-metadata.format.group=appendix.configuration-metadata.format.group +configuration-metadata.format.property=appendix.configuration-metadata.format.property +configuration-metadata.format.hints=appendix.configuration-metadata.format.hints +configuration-metadata.format.repeated-items=appendix.configuration-metadata.format.repeated-items +configuration-metadata.manual-hints=appendix.configuration-metadata.manual-hints +configuration-metadata.manual-hints.value-hint=appendix.configuration-metadata.manual-hints.value-hint +configuration-metadata.manual-hints.value-providers=appendix.configuration-metadata.manual-hints.value-providers +configuration-metadata.manual-hints.value-providers.any=appendix.configuration-metadata.manual-hints.value-providers.any +configuration-metadata.manual-hints.value-providers.class-reference=appendix.configuration-metadata.manual-hints.value-providers.class-reference +configuration-metadata.manual-hints.value-providers.handle-as=appendix.configuration-metadata.manual-hints.value-providers.handle-as +configuration-metadata.manual-hints.value-providers.logger-name=appendix.configuration-metadata.manual-hints.value-providers.logger-name +configuration-metadata.manual-hints.value-providers.spring-bean-reference=appendix.configuration-metadata.manual-hints.value-providers.spring-bean-reference +configuration-metadata.manual-hints.value-providers.spring-profile-name=appendix.configuration-metadata.manual-hints.value-providers.spring-profile-name +configuration-metadata.annotation-processor=appendix.configuration-metadata.annotation-processor +configuration-metadata.annotation-processor.configuring=appendix.configuration-metadata.annotation-processor.configuring +configuration-metadata.annotation-processor.automatic-metadata-generation=appendix.configuration-metadata.annotation-processor.automatic-metadata-generation +configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties=appendix.configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties +configuration-metadata.annotation-processor.adding-additional-metadata=appendix.configuration-metadata.annotation-processor.adding-additional-metadata + +auto-configuration-classes=appendix.auto-configuration-classes +auto-configuration-classes-from-autoconfigure-module=appendix.auto-configuration-classes.core +auto-configuration-classes-from-actuator=appendix.auto-configuration-classes.actuator + +auto-configuration-classes.core=appendix.auto-configuration-classes.core +auto-configuration-classes.actuator=appendix.auto-configuration-classes.actuator + +test-auto-configuration=appendix.test-auto-configuration +test-auto-configuration-slices=appendix.test-auto-configuration.slices + +test-auto-configuration.slices=appendix.test-auto-configuration.slices + +executable-jar=appendix.executable-jar +executable-jar-nested-jars=appendix.executable-jar.nested-jars +executable-jar-jar-file-structure=appendix.executable-jar.nested-jars.jar-structure +executable-jar-war-file-structure=appendix.executable-jar.nested-jars.war-structure +executable-jar-war-index-files=appendix.executable-jar.nested-jars.index-files +executable-jar-war-index-files-classpath=appendix.executable-jar.nested-jars.classpath-index +executable-jar-war-index-files-layers=appendix.executable-jar.nested-jars.layer-index +executable-jar-jarfile=appendix.executable-jar.jarfile-class +executable-jar-jarfile-compatibility=appendix.executable-jar.jarfile-class.compatibility +executable-jar-launching=appendix.executable-jar.launching +executable-jar-launcher-manifest=appendix.executable-jar.launching.manifest +executable-jar-property-launcher-features=appendix.executable-jar.property-launcher +executable-jar-restrictions=appendix.executable-jar.restrictions +executable-jar-alternatives=appendix.executable-jar.alternatives + +executable-jar.nested-jars=appendix.executable-jar.nested-jars +executable-jar.nested-jars.jar-structure=appendix.executable-jar.nested-jars.jar-structure +executable-jar.nested-jars.war-structure=appendix.executable-jar.nested-jars.war-structure +executable-jar.nested-jars.index-files=appendix.executable-jar.nested-jars.index-files +executable-jar.nested-jars.classpath-index=appendix.executable-jar.nested-jars.classpath-index +executable-jar.nested-jars.layer-index=appendix.executable-jar.nested-jars.layer-index +executable-jar.jarfile-class=appendix.executable-jar.jarfile-class +executable-jar.jarfile-class.compatibility=appendix.executable-jar.jarfile-class.compatibility +executable-jar.launching=appendix.executable-jar.launching +executable-jar.launching.manifest=appendix.executable-jar.launching.manifest +executable-jar.property-launcher=appendix.executable-jar.property-launcher +executable-jar.restrictions=appendix.executable-jar.restrictions +executable-jar.alternatives=appendix.executable-jar.alternatives + +dependency-versions=appendix.dependency-versions +dependency-versions-coordinates=appendix.dependency-versions.coordinates +dependency-versions-properties=appendix.dependency-versions.properties + +dependency-versions.coordinates=appendix.dependency-versions.coordinates +dependency-versions.properties=appendix.dependency-versions.properties + diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/application-properties.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/application-properties.adoc index e66a523647..74adc6cc41 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/application-properties.adoc @@ -1,5 +1,5 @@ [appendix] -[[application-properties]] +[[appendix.application-properties]] = Common Application Properties include::attributes.adoc[] diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes.adoc index c0d586a076..13252737c0 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes.adoc @@ -1,5 +1,5 @@ [appendix] -[[auto-configuration-classes]] +[[appendix.auto-configuration-classes]] = Auto-configuration Classes include::attributes.adoc[] diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes/actuator.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes/actuator.adoc index 4403ec3da3..517465ea7b 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes/actuator.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes/actuator.adoc @@ -1,4 +1,4 @@ -[[auto-configuration-classes.actuator]] +[[appendix.auto-configuration-classes.actuator]] == spring-boot-actuator-autoconfigure The following auto-configuration classes are from the `spring-boot-actuator-autoconfigure` module: diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes/core.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes/core.adoc index eb9c201c88..0b70c76a13 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes/core.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes/core.adoc @@ -1,4 +1,4 @@ -[[auto-configuration-classes.core]] +[[appendix.auto-configuration-classes.core]] == spring-boot-autoconfigure The following auto-configuration classes are from the `spring-boot-autoconfigure` module: diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/build-tool-plugins/other-build-systems.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/build-tool-plugins/other-build-systems.adoc index 7c5d6a360b..bc560fc168 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/build-tool-plugins/other-build-systems.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/build-tool-plugins/other-build-systems.adoc @@ -1,7 +1,7 @@ [[build-tool-plugins.other-build-systems]] == Supporting Other Build Systems If you want to use a build tool other than Maven, Gradle, or Ant, you likely need to develop your own plugin. -Executable jars need to follow a specific format and certain entries need to be written in an uncompressed form (see the "`<>`" section in the appendix for details). +Executable jars need to follow a specific format and certain entries need to be written in an uncompressed form (see the "`<>`" section in the appendix for details). The Spring Boot Maven and Gradle plugins both make use of `spring-boot-loader-tools` to actually generate jars. If you need to, you may use this library directly. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/build-tool-plugins/whats-next.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/build-tool-plugins/whats-next.adoc index ed22fc2e9c..8bd05a7dba 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/build-tool-plugins/whats-next.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/build-tool-plugins/whats-next.adoc @@ -1,6 +1,6 @@ [[build-tool-plugins.whats-next]] == What to Read Next If you are interested in how the build tool plugins work, you can look at the {spring-boot-code}/spring-boot-project/spring-boot-tools[`spring-boot-tools`] module on GitHub. -More technical details of the executable jar format are covered in <>. +More technical details of the executable jar format are covered in <>. If you have specific build-related questions, you can check out the "`<>`" guides. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/cli/using-the-cli.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/cli/using-the-cli.adoc index 0939f0e2ae..066472a476 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/cli/using-the-cli.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/cli/using-the-cli.adoc @@ -146,7 +146,7 @@ Doing so consults Spring Boot's default dependency metadata to deduce the artifa NOTE: The default metadata is tied to the version of the CLI that you use. It changes only when you move to a new version of the CLI, putting you in control of when the versions of your dependencies may change. -A table showing the dependencies and their versions that are included in the default metadata can be found in the <>. +A table showing the dependencies and their versions that are included in the default metadata can be found in the <>. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata.adoc index a2346feb67..5a5fb7b435 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata.adoc @@ -1,5 +1,5 @@ [appendix] -[[configuration-metadata]] +[[appendix.configuration-metadata]] = Configuration Metadata include::attributes.adoc[] @@ -9,7 +9,7 @@ Spring Boot jars include metadata files that provide details of all supported co The files are designed to let IDE developers offer contextual help and "`code completion`" as users are working with `application.properties` or `application.yml` files. The majority of the metadata file is generated automatically at compile time by processing all items annotated with `@ConfigurationProperties`. -However, it is possible to <> for corner cases or more advanced use cases. +However, it is possible to <> for corner cases or more advanced use cases. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/annotation-processor.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/annotation-processor.adoc index 5f5e521523..8637445613 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/annotation-processor.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/annotation-processor.adoc @@ -1,11 +1,11 @@ -[[configuration-metadata.annotation-processor]] +[[appendix.configuration-metadata.annotation-processor]] == Generating Your Own Metadata by Using the Annotation Processor You can easily generate your own configuration metadata file from items annotated with `@ConfigurationProperties` by using the `spring-boot-configuration-processor` jar. The jar includes a Java annotation processor which is invoked as your project is compiled. -[[configuration-metadata.annotation-processor.configuring]] +[[appendix.configuration-metadata.annotation-processor.configuring]] === Configuring the Annotation Processor To use the processor, include a dependency on `spring-boot-configuration-processor`. @@ -59,7 +59,7 @@ You could also let the AspectJ plugin run all the processing and disable annotat -[[configuration-metadata.annotation-processor.automatic-metadata-generation]] +[[appendix.configuration-metadata.annotation-processor.automatic-metadata-generation]] === Automatic Metadata Generation The processor picks up both classes and methods that are annotated with `@ConfigurationProperties`. @@ -83,7 +83,7 @@ The annotation processor applies a number of heuristics to extract the default v Default values have to be provided statically. In particular, do not refer to a constant defined in another class. Also, the annotation processor cannot auto-detect default values for ``Enum``s and ``Collections``s. -For cases where the default value could not be detected, <> should be provided. +For cases where the default value could not be detected, <> should be provided. Consider the following example: [source,java,indent=0,subs="verbatim"] @@ -91,7 +91,7 @@ Consider the following example: include::{docs-java}/configurationmetadata/annotationprocessor/automaticmetadatageneration/MyMessagingProperties.java[] ---- -In order to document default values for properties in the class above, you could add the following content to <>: +In order to document default values for properties in the class above, you could add the following content to <>: [source,json,indent=0,subs="verbatim"] ---- @@ -111,7 +111,7 @@ NOTE: Only the `name` of the property is required to document additional metadat -[[configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties]] +[[appendix.configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties]] ==== Nested Properties The annotation processor automatically considers inner classes as nested properties. Rather than documenting the `ip` and `port` at the root of the namespace, we could create a sub-namespace for it. @@ -129,7 +129,7 @@ TIP: This has no effect on collections and maps, as those types are automaticall -[[configuration-metadata.annotation-processor.adding-additional-metadata]] +[[appendix.configuration-metadata.annotation-processor.adding-additional-metadata]] === Adding Additional Metadata Spring Boot's configuration file handling is quite flexible, and it is often the case that properties may exist that are not bound to a `@ConfigurationProperties` bean. You may also need to tune some attributes of an existing key. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/format.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/format.adoc index e477628365..ebc69d5089 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/format.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/format.adoc @@ -1,4 +1,4 @@ -[[configuration-metadata.format]] +[[appendix.configuration-metadata.format]] == Metadata Format Configuration metadata files are located inside jars under `META-INF/spring-configuration-metadata.json`. They use a JSON format with items categorized under either "`groups`" or "`properties`" and additional values hints categorized under "hints", as shown in the following example: @@ -86,7 +86,7 @@ For example, when a developer is configuring the configprop:spring.jpa.hibernate -[[configuration-metadata.format.group]] +[[appendix.configuration-metadata.format.group]] === Group Attributes The JSON object contained in the `groups` array can contain the attributes shown in the following table: @@ -127,7 +127,7 @@ The JSON object contained in the `groups` array can contain the attributes shown -[[configuration-metadata.format.property]] +[[appendix.configuration-metadata.format.property]] === Property Attributes The JSON object contained in the `properties` array can contain the attributes described in the following table: @@ -223,7 +223,7 @@ Doing so is particularly useful when a `replacement` is provided. -[[configuration-metadata.format.hints]] +[[appendix.configuration-metadata.format.hints]] === Hint Attributes The JSON object contained in the `hints` array can contain the attributes shown in the following table: @@ -286,7 +286,7 @@ The JSON object contained in the `providers` attribute of each `hint` element ca -[[configuration-metadata.format.repeated-items]] +[[appendix.configuration-metadata.format.repeated-items]] === Repeated Metadata Items Objects with the same "`property`" and "`group`" name can appear multiple times within a metadata file. For example, you could bind two separate classes to the same prefix, with each having potentially overlapping property names. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/manual-hints.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/manual-hints.adoc index 4df1946045..1b4013c01a 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/manual-hints.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/manual-hints.adoc @@ -1,4 +1,4 @@ -[[configuration-metadata.manual-hints]] +[[appendix.configuration-metadata.manual-hints]] == Providing Manual Hints To improve the user experience and further assist the user in configuring a given property, you can provide additional metadata that: @@ -7,10 +7,10 @@ To improve the user experience and further assist the user in configuring a give -[[configuration-metadata.manual-hints.value-hint]] +[[appendix.configuration-metadata.manual-hints.value-hint]] === Value Hint The `name` attribute of each hint refers to the `name` of a property. -In the <>, we provide five values for the `spring.jpa.hibernate.ddl-auto` property: `none`, `validate`, `update`, `create`, and `create-drop`. +In the <>, we provide five values for the `spring.jpa.hibernate.ddl-auto` property: `none`, `validate`, `update`, `create`, and `create-drop`. Each value may have a description as well. If your property is of type `Map`, you can provide hints for both the keys and the values (but not for the map itself). @@ -24,7 +24,7 @@ include::{docs-java}/configurationmetadata/manualhints/valuehint/MyProperties.ja ---- The magic values are (in this example) are `sample1` and `sample2`. -In order to offer additional content assistance for the keys, you could add the following JSON to <>: +In order to offer additional content assistance for the keys, you could add the following JSON to <>: [source,json,indent=0,subs="verbatim"] ---- @@ -48,7 +48,7 @@ If your IDE supports it, this is by far the most effective approach to auto-comp -[[configuration-metadata.manual-hints.value-providers]] +[[appendix.configuration-metadata.manual-hints.value-providers]] === Value Providers Providers are a powerful way to attach semantics to a property. In this section, we define the official providers that you can use for your own hints. @@ -92,7 +92,7 @@ If no provider for a given property is supported, no special content assistance -[[configuration-metadata.manual-hints.value-providers.any]] +[[appendix.configuration-metadata.manual-hints.value-providers.any]] ==== Any The special **any** provider value permits any additional values to be provided. Regular value validation based on the property type should be applied if this is supported. @@ -127,7 +127,7 @@ Note that, in the preceding example, any other value is also allowed. -[[configuration-metadata.manual-hints.value-providers.class-reference]] +[[appendix.configuration-metadata.manual-hints.value-providers.class-reference]] ==== Class Reference The **class-reference** provider auto-completes classes available in the project. This provider supports the following parameters: @@ -171,7 +171,7 @@ The following metadata snippet corresponds to the standard `server.servlet.jsp.c -[[configuration-metadata.manual-hints.value-providers.handle-as]] +[[appendix.configuration-metadata.manual-hints.value-providers.handle-as]] ==== Handle As The **handle-as** provider lets you substitute the type of the property to a more high-level type. This typically happens when the property has a `java.lang.String` type, because you do not want your configuration classes to rely on classes that may not be on the classpath. @@ -221,7 +221,7 @@ It is actually used internally as a `org.springframework.core.io.Resource` but c -[[configuration-metadata.manual-hints.value-providers.logger-name]] +[[appendix.configuration-metadata.manual-hints.value-providers.logger-name]] ==== Logger Name The **logger-name** provider auto-completes valid logger names and <>. Typically, package and class names available in the current project can be auto-completed. @@ -308,7 +308,7 @@ As Spring Boot defines a few logger groups out-of-the-box, dedicated value hints -[[configuration-metadata.manual-hints.value-providers.spring-bean-reference]] +[[appendix.configuration-metadata.manual-hints.value-providers.spring-bean-reference]] ==== Spring Bean Reference The **spring-bean-reference** provider auto-completes the beans that are defined in the configuration of the current project. This provider supports the following parameters: @@ -348,7 +348,7 @@ If you provide that hint, you still need to transform the bean name into an actu -[[configuration-metadata.manual-hints.value-providers.spring-profile-name]] +[[appendix.configuration-metadata.manual-hints.value-providers.spring-profile-name]] ==== Spring Profile Name The **spring-profile-name** provider auto-completes the Spring profiles that are defined in the configuration of the current project. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/dependency-versions.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/dependency-versions.adoc index 8e33b0b0e7..c2ca180dea 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/dependency-versions.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/dependency-versions.adoc @@ -1,5 +1,5 @@ [appendix] -[[dependency-versions]] +[[appendix.dependency-versions]] = Dependency Versions include::attributes.adoc[] diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/dependency-versions/coordinates.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/dependency-versions/coordinates.adoc index 981831b262..1643a9a6c2 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/dependency-versions/coordinates.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/dependency-versions/coordinates.adoc @@ -1,4 +1,4 @@ -[[dependency-versions.coordinates]] +[[appendix.dependency-versions.coordinates]] == Managed Dependency Coordinates The following table provides details of all of the dependency versions that are provided by Spring Boot in its CLI (Command Line Interface), Maven dependency management, and Gradle plugin. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/dependency-versions/properties.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/dependency-versions/properties.adoc index a2bdfa141d..5d89329176 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/dependency-versions/properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/dependency-versions/properties.adoc @@ -1,4 +1,4 @@ -[[dependency-versions.properties]] +[[appendix.dependency-versions.properties]] == Version Properties The following table provides all properties that can be used to override the versions managed by Spring Boot. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/documentation/advanced.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/documentation/advanced.adoc index 00f0c61aca..7617561d11 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/documentation/advanced.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/documentation/advanced.adoc @@ -4,4 +4,4 @@ Finally, we have a few topics for more advanced users: * *Spring Boot Applications Deployment:* <> | <> * *Build tool plugins:* <> | <> -* *Appendix:* <> | <> | <> | <> | <> | <> +* *Appendix:* <> | <> | <> | <> | <> | <> diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar.adoc index 250a5f41fc..49bb31a01a 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar.adoc @@ -1,5 +1,5 @@ [appendix] -[[executable-jar]] +[[appendix.executable-jar]] = The Executable Jar Format include::attributes.adoc[] diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/alternatives.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/alternatives.adoc index 8acf587fc5..30d4bbc6f2 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/alternatives.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/alternatives.adoc @@ -1,4 +1,4 @@ -[[executable-jar.alternatives]] +[[appendix.executable-jar.alternatives]] == Alternative Single Jar Solutions If the preceding restrictions mean that you cannot use Spring Boot Loader, consider the following alternatives: diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/jarfile-class.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/jarfile-class.adoc index decc8f5a2c..65e3d3de9b 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/jarfile-class.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/jarfile-class.adoc @@ -1,4 +1,4 @@ -[[executable-jar.jarfile-class]] +[[appendix.executable-jar.jarfile-class]] == Spring Boot's "`JarFile`" Class The core class used to support loading nested jars is `org.springframework.boot.loader.jar.JarFile`. It lets you load jar content from a standard jar file or from nested child jar data. @@ -25,7 +25,7 @@ We do not need to unpack the archive, and we do not need to read all entry data -[[executable-jar.jarfile-class.compatibility]] +[[appendix.executable-jar.jarfile-class.compatibility]] === Compatibility with the Standard Java "`JarFile`" Spring Boot Loader strives to remain compatible with existing code and libraries. `org.springframework.boot.loader.jar.JarFile` extends from `java.util.jar.JarFile` and should work as a drop-in replacement. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/launching.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/launching.adoc index 92c280dbda..a672c69634 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/launching.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/launching.adoc @@ -1,4 +1,4 @@ -[[executable-jar.launching]] +[[appendix.executable-jar.launching]] == Launching Executable Jars The `org.springframework.boot.loader.Launcher` class is a special bootstrap class that is used as an executable jar's main entry point. It is the actual `Main-Class` in your jar file, and it is used to setup an appropriate `URLClassLoader` and ultimately call your `main()` method. @@ -13,7 +13,7 @@ You can add additional locations by setting an environment variable called `LOAD -[[executable-jar.launching.manifest]] +[[appendix.executable-jar.launching.manifest]] === Launcher Manifest You need to specify an appropriate `Launcher` as the `Main-Class` attribute of `META-INF/MANIFEST.MF`. The actual class that you want to launch (that is, the class that contains a `main` method) should be specified in the `Start-Class` attribute. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/nested-jars.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/nested-jars.adoc index 4fdd68ab2d..b163b39741 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/nested-jars.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/nested-jars.adoc @@ -1,4 +1,4 @@ -[[executable-jar.nested-jars]] +[[appendix.executable-jar.nested-jars]] == Nested JARs Java does not provide any standard way to load nested jar files (that is, jar files that are themselves contained within a jar). This can be problematic if you need to distribute a self-contained application that can be run from the command line without unpacking. @@ -11,7 +11,7 @@ Spring Boot takes a different approach and lets you actually nest jars directly. -[[executable-jar.nested-jars.jar-structure]] +[[appendix.executable-jar.nested-jars.jar-structure]] === The Executable Jar File Structure Spring Boot Loader-compatible jar files should be structured in the following way: @@ -41,7 +41,7 @@ Dependencies should be placed in a nested `BOOT-INF/lib` directory. -[[executable-jar.nested-jars.war-structure]] +[[appendix.executable-jar.nested-jars.war-structure]] === The Executable War File Structure Spring Boot Loader-compatible war files should be structured in the following way: @@ -75,7 +75,7 @@ Any dependencies that are required when running embedded but are not required wh -[[executable-jar.nested-jars.index-files]] +[[appendix.executable-jar.nested-jars.index-files]] === Index Files Spring Boot Loader-compatible jar and war archives can include additional index files under the `BOOT-INF/` directory. A `classpath.idx` file can be provided for both jars and wars, and it provides the ordering that jars should be added to the classpath. @@ -86,7 +86,7 @@ These files, however, are _not_ parsed internally as YAML and they must be writt -[[executable-jar.nested-jars.classpath-index]] +[[appendix.executable-jar.nested-jars.classpath-index]] === Classpath Index The classpath index file can be provided in `BOOT-INF/classpath.idx`. It provides a list of jar names (including the directory) in the order that they should be added to the classpath. @@ -118,7 +118,7 @@ The index file would look like this: -[[executable-jar.nested-jars.layer-index]] +[[appendix.executable-jar.nested-jars.layer-index]] === Layer Index The layers index file can be provided in `BOOT-INF/layers.idx`. It provides a list of layers and the parts of the jar that should be contained within them. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/property-launcher.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/property-launcher.adoc index e3f3dbdd02..675a2bc278 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/property-launcher.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/property-launcher.adoc @@ -1,4 +1,4 @@ -[[executable-jar.property-launcher]] +[[appendix.executable-jar.property-launcher]] == PropertiesLauncher Features `PropertiesLauncher` has a few special features that can be enabled with external properties (System properties, environment variables, manifest entries, or `loader.properties`). The following table describes these properties: diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/restrictions.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/restrictions.adoc index f1be108422..92df8346fa 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/restrictions.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/restrictions.adoc @@ -1,10 +1,10 @@ -[[executable-jar.restrictions]] +[[appendix.executable-jar.restrictions]] == Executable Jar Restrictions You need to consider the following restrictions when working with a Spring Boot Loader packaged application: -[[executable-jar-zip-entry-compression]] +[[appendix.executable-jar-zip-entry-compression]] * Zip entry compression: The `ZipEntry` for a nested jar must be saved by using the `ZipEntry.STORED` method. This is required so that we can seek directly to individual content within the nested jar. @@ -12,7 +12,7 @@ The content of the nested jar file itself can still be compressed, as can any ot -[[executable-jar-system-classloader]] +[[appendix.executable-jar-system-classloader]] * System classLoader: Launched applications should use `Thread.getContextClassLoader()` when loading classes (most libraries and frameworks do so by default). Trying to load nested jar classes with `ClassLoader.getSystemClassLoader()` fails. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc index afd1f457f2..6703efb4f5 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc @@ -267,7 +267,7 @@ Here are some rules we follow internally to make sure descriptions are consisten * Use `java.time.Duration` rather than `long` and describe the default unit if it differs from milliseconds, e.g. "If a duration suffix is not specified, seconds will be used". * Do not provide the default value in the description unless it has to be determined at runtime. -Make sure to <> so that IDE assistance is available for your keys as well. +Make sure to <> so that IDE assistance is available for your keys as well. You may want to review the generated metadata (`META-INF/spring-configuration-metadata.json`) to make sure your keys are properly documented. Using your own starter in a compatible IDE is also a good idea to validate that quality of the metadata. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-web-applications.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-web-applications.adoc index e21b49c21b..51edf07c67 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-web-applications.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-web-applications.adoc @@ -337,7 +337,7 @@ For machine clients, it produces a JSON response with details of the error, the For browser clients, there is a "`whitelabel`" error view that renders the same data in HTML format (to customize it, add a `View` that resolves to `error`). There are a number of `server.error` properties that can be set if you want to customize the default error handling behavior. -See the <> section of the Appendix. +See the <> section of the Appendix. To replace the default behavior completely, you can implement `ErrorController` and register a bean definition of that type or add a bean of type `ErrorAttributes` to use the existing mechanism but replace the contents. 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 4214227377..8aae074af7 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 @@ -801,7 +801,7 @@ include::{docs-java}/features/externalconfig/typesafeconfigurationproperties/usi ---- TIP: Using `@ConfigurationProperties` also lets you generate metadata files that can be used by IDEs to offer auto-completion for your own keys. -See the <> for details. +See the <> for details. @@ -1199,7 +1199,7 @@ The following table summarizes the features that are supported by `@Configuratio | Yes | Limited (see <>) -| <> +| <> | Yes | No diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/kotlin.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/kotlin.adoc index 056a9748d9..50b8adc2f2 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/kotlin.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/kotlin.adoc @@ -126,7 +126,7 @@ data class KotlinExampleProperties( } ---- -TIP: To generate <> using the annotation processor, {kotlin-docs}kapt.html[`kapt` should be configured] with the `spring-boot-configuration-processor` dependency. +TIP: To generate <> using the annotation processor, {kotlin-docs}kapt.html[`kapt` should be configured] with the `spring-boot-configuration-processor` dependency. Note that some features (such as detecting the default value or deprecated items) are not working due to limitations in the model kapt provides. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/messaging.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/messaging.adoc index ec58d1ca7a..475617e1f8 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/messaging.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/messaging.adoc @@ -411,7 +411,7 @@ You can customize this behavior using the configprop:spring.kafka.streams.auto-s [[features.messaging.kafka.additional-properties]] ==== Additional Kafka Properties -The properties supported by auto configuration are shown in <>. +The properties supported by auto configuration are shown in <>. Note that, for the most part, these properties (hyphenated or camelCase) map directly to the Apache Kafka dotted properties. Refer to the Apache Kafka documentation for details. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc index 6c918a972c..bdd59886a3 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc @@ -334,7 +334,7 @@ To test that object JSON serialization and deserialization is working as expecte * `Gson` * `Jsonb` -TIP: A list of the auto-configurations that are enabled by `@JsonTest` can be <>. +TIP: A list of the auto-configurations that are enabled by `@JsonTest` can be <>. If you need to configure elements of the auto-configuration, you can use the `@AutoConfigureJsonTesters` annotation. @@ -369,7 +369,7 @@ To test whether Spring MVC controllers are working as expected, use the `@WebMvc Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@WebMvcTest` annotation is used. `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. -TIP: A list of the auto-configuration settings that are enabled by `@WebMvcTest` can be <>. +TIP: A list of the auto-configuration settings that are enabled by `@WebMvcTest` can be <>. TIP: If you need to register extra components, such as the Jackson `Module`, you can import additional configuration classes by using `@Import` on your test. @@ -417,7 +417,7 @@ To test that {spring-framework-docs}/web-reactive.html[Spring WebFlux] controlle Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@WebFluxTest` annotation is used. `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. -TIP: A list of the auto-configurations that are enabled by `@WebFluxTest` can be <>. +TIP: A list of the auto-configurations that are enabled by `@WebFluxTest` can be <>. TIP: If you need to register extra components, such as Jackson `Module`, you can import additional configuration classes using `@Import` on your test. @@ -453,7 +453,7 @@ Regular `@Component` and `@ConfigurationProperties` beans are not scanned when t `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. (For more about using Cassandra with Spring Boot, see "<>", earlier in this chapter.) -TIP: A list of the auto-configuration settings that are enabled by `@DataCassandraTest` can be <>. +TIP: A list of the auto-configuration settings that are enabled by `@DataCassandraTest` can be <>. The following example shows a typical setup for using Cassandra tests in Spring Boot: @@ -475,7 +475,7 @@ This can be disabled using the `showSql()` attribute of the annotation. Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataJpaTest` annotation is used. `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. -TIP: A list of the auto-configuration settings that are enabled by `@DataJpaTest` can be <>. +TIP: A list of the auto-configuration settings that are enabled by `@DataJpaTest` can be <>. By default, data JPA tests are transactional and roll back at the end of each test. See the {spring-framework-docs}/testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details. @@ -516,7 +516,7 @@ By default, it configures an in-memory embedded database and a `JdbcTemplate`. Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@JdbcTest` annotation is used. `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. -TIP: A list of the auto-configurations that are enabled by `@JdbcTest` can be <>. +TIP: A list of the auto-configurations that are enabled by `@JdbcTest` can be <>. By default, JDBC tests are transactional and roll back at the end of each test. See the {spring-framework-docs}/testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details. @@ -539,7 +539,7 @@ By default, it configures an in-memory embedded database, a `JdbcTemplate`, and Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataJdbcTest` annotation is used. `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. -TIP: A list of the auto-configurations that are enabled by `@DataJdbcTest` can be <>. +TIP: A list of the auto-configurations that are enabled by `@DataJdbcTest` can be <>. By default, Data JDBC tests are transactional and roll back at the end of each test. See the {spring-framework-docs}/testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details. @@ -559,7 +559,7 @@ If you want to replace it with an in-memory database, you can use `@AutoConfigur Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@JooqTest` annotation is used. `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. -TIP: A list of the auto-configurations that are enabled by `@JooqTest` can be <>. +TIP: A list of the auto-configurations that are enabled by `@JooqTest` can be <>. `@JooqTest` configures a `DSLContext`. The following example shows the `@JooqTest` annotation in use: @@ -582,7 +582,7 @@ Regular `@Component` and `@ConfigurationProperties` beans are not scanned when t `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. (For more about using MongoDB with Spring Boot, see "<>", earlier in this chapter.) -TIP: A list of the auto-configuration settings that are enabled by `@DataMongoTest` can be <>. +TIP: A list of the auto-configuration settings that are enabled by `@DataMongoTest` can be <>. The following class shows the `@DataMongoTest` annotation in use: @@ -609,7 +609,7 @@ Regular `@Component` and `@ConfigurationProperties` beans are not scanned when t `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. (For more about using Neo4J with Spring Boot, see "<>", earlier in this chapter.) -TIP: A list of the auto-configuration settings that are enabled by `@DataNeo4jTest` can be <>. +TIP: A list of the auto-configuration settings that are enabled by `@DataNeo4jTest` can be <>. The following example shows a typical setup for using Neo4J tests in Spring Boot: @@ -640,7 +640,7 @@ Regular `@Component` and `@ConfigurationProperties` beans are not scanned when t `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. (For more about using Redis with Spring Boot, see "<>", earlier in this chapter.) -TIP: A list of the auto-configuration settings that are enabled by `@DataRedisTest` can be <>. +TIP: A list of the auto-configuration settings that are enabled by `@DataRedisTest` can be <>. The following example shows the `@DataRedisTest` annotation in use: @@ -659,7 +659,7 @@ Regular `@Component` and `@ConfigurationProperties` beans are not scanned when t `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. (For more about using LDAP with Spring Boot, see "<>", earlier in this chapter.) -TIP: A list of the auto-configuration settings that are enabled by `@DataLdapTest` can be <>. +TIP: A list of the auto-configuration settings that are enabled by `@DataLdapTest` can be <>. The following example shows the `@DataLdapTest` annotation in use: @@ -685,7 +685,7 @@ By default, it auto-configures Jackson, GSON, and Jsonb support, configures a `R Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@RestClientTest` annotation is used. `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. -TIP: A list of the auto-configuration settings that are enabled by `@RestClientTest` can be <>. +TIP: A list of the auto-configuration settings that are enabled by `@RestClientTest` can be <>. The specific beans that you want to test should be specified by using the `value` or `components` attribute of `@RestClientTest`, as shown in the following example: @@ -787,7 +787,7 @@ By default, it configures a mock `WebServiceServer` bean and automatically custo (For more about using Web Services with Spring Boot, see "<>", earlier in this chapter.) -TIP: A list of the auto-configuration settings that are enabled by `@WebServiceClientTest` can be <>. +TIP: A list of the auto-configuration settings that are enabled by `@WebServiceClientTest` can be <>. The following example shows the `@WebServiceClientTest` annotation in use: diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/first-application.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/first-application.adoc index 9f9f28eb11..e5bf793229 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/first-application.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/first-application.adoc @@ -239,7 +239,7 @@ An uber jar packages all the classes from all the application's dependencies int The problem with this approach is that it becomes hard to see which libraries are in your application. It can also be problematic if the same filename is used (but with different content) in multiple jars. -Spring Boot takes a <> and lets you actually nest jars directly. +Spring Boot takes a <> and lets you actually nest jars directly. **** To create an executable jar, we need to add the `spring-boot-maven-plugin` to our `pom.xml`. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/build.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/build.adoc index cce84f4305..8f6eac8122 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/build.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/build.adoc @@ -149,7 +149,7 @@ If your application contains classes that you want to share with other projects, The separate module can then be depended upon by your application and other projects. If you cannot rearrange your code as recommended above, Spring Boot's Maven and Gradle plugins must be configured to produce a separate artifact that is suitable for use as a dependency. -The executable archive cannot be used as a dependency as the <> packages application classes in `BOOT-INF/classes`. +The executable archive cannot be used as a dependency as the <> packages application classes in `BOOT-INF/classes`. This means that they cannot be found when the executable jar is used as a dependency. To produce the two artifacts, one that can be used as a dependency and one that is executable, a classifier must be specified. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc index cd1be837a0..6090889e63 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc @@ -300,6 +300,6 @@ There is not (and technically cannot be) an exhaustive list of all supported pro A running application with the Actuator features has a `configprops` endpoint that shows all the bound and bindable properties available through `@ConfigurationProperties`. -The appendix includes an <> example with a list of the most common properties supported by Spring Boot. +The appendix includes an <> example with a list of the most common properties supported by Spring Boot. The definitive list comes from searching the source code for `@ConfigurationProperties` and `@Value` annotations as well as the occasional use of `Binder`. For more about the exact ordering of loading properties, see "<>". diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc index 68806c7bf2..9a8a9d08f6 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc @@ -235,7 +235,7 @@ As of Undertow 1.4.0+, both `h2` and `h2c` are supported on JDK 8 without any ad === Configure the Web Server Generally, you should first consider using one of the many available configuration keys and customize your web server by adding new entries in your `application.properties` (or `application.yml`, or environment, etc. see "`<>`"). The `server.{asterisk}` namespace is quite useful here, and it includes namespaces like `server.tomcat.{asterisk}`, `server.jetty.{asterisk}` and others, for server-specific features. -See the list of <>. +See the list of <>. The previous sections covered already many common use cases, such as compression, SSL or HTTP/2. However, if a configuration key doesn't exist for your use case, you should then look at {spring-boot-module-api}/web/server/WebServerFactoryCustomizer.html[`WebServerFactoryCustomizer`]. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/index.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/index.adoc index 19feeae45c..5741c7f5db 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/index.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/index.adoc @@ -26,9 +26,9 @@ The reference documentation consists of the following sections: The reference documentation has the following appendices: [horizontal] -<> :: Common application properties that can be used to configure your application. -<> :: Metadata used to describe configuration properties. -<> :: Auto-configuration classes provided by Spring Boot. -<> :: Test auto-configuration annotations used to test slices of your application. -<> :: Spring Boot's executable jars, their launchers, and their format. -<> :: Details of the dependencies that are managed by Spring Boot. +<> :: Common application properties that can be used to configure your application. +<> :: Metadata used to describe configuration properties. +<> :: Auto-configuration classes provided by Spring Boot. +<> :: Test auto-configuration annotations used to test slices of your application. +<> :: Spring Boot's executable jars, their launchers, and their format. +<> :: Details of the dependencies that are managed by Spring Boot. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/index.singleadoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/index.singleadoc index 25c6c144c6..cf397c9a43 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/index.singleadoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/index.singleadoc @@ -37,14 +37,14 @@ include::howto.adoc[leveloffset=+1] [[appendix]] == Appendices -include::application-properties.adoc[leveloffset=+1] +include::application-properties.adoc[leveloffset=+2] -include::configuration-metadata.adoc[leveloffset=+1] +include::configuration-metadata.adoc[leveloffset=+2] -include::auto-configuration-classes.adoc[leveloffset=+1] +include::auto-configuration-classes.adoc[leveloffset=+2] -include::test-auto-configuration.adoc[leveloffset=+1] +include::test-auto-configuration.adoc[leveloffset=+2] -include::executable-jar.adoc[leveloffset=+1] +include::executable-jar.adoc[leveloffset=+2] -include::dependency-versions.adoc[leveloffset=+1] +include::dependency-versions.adoc[leveloffset=+2] diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/test-auto-configuration.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/test-auto-configuration.adoc index b73138a5cf..23b985725e 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/test-auto-configuration.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/test-auto-configuration.adoc @@ -1,5 +1,5 @@ [appendix] -[[test-auto-configuration]] +[[appendix.test-auto-configuration]] = Test Auto-configuration Annotations include::attributes.adoc[] diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/test-auto-configuration/slices.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/test-auto-configuration/slices.adoc index eef005567c..298de249c5 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/test-auto-configuration/slices.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/test-auto-configuration/slices.adoc @@ -1,4 +1,4 @@ -[[test-auto-configuration.slices]] +[[appendix.test-auto-configuration.slices]] == Test Slices The following table lists the various `@...Test` annotations that can be used to test slices of your application and the auto-configuration that they import by default: