Skip to content

Commit 9d06972

Browse files
committed
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. See gh-27003.
1 parent 52f1799 commit 9d06972

37 files changed

+92
-91
lines changed

buildSrc/src/main/java/org/springframework/boot/build/context/properties/Snippets.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ private Set<String> writeSnippet(Path outputDirectory, Snippet snippet, Set<Stri
9090

9191
private Asciidoc getAsciidoc(Snippet snippet, Table table) {
9292
Asciidoc asciidoc = new Asciidoc();
93-
asciidoc.appendln("[[" + snippet.getAnchor() + "]]");
93+
// We have to prepend 'appendix.' as a section id here, otherwise the spring-asciidoctor-extensions:section-id asciidoctor extension complains
94+
asciidoc.appendln("[[appendix." + snippet.getAnchor() + "]]");
9495
asciidoc.appendln("== ", snippet.getTitle());
9596
table.write(asciidoc);
9697
return asciidoc;

spring-boot-project/spring-boot-docs/src/docs/asciidoc/application-properties.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[appendix]
2-
[[application-properties]]
2+
[[appendix.application-properties]]
33
= Common Application Properties
44
include::attributes.adoc[]
55

spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[appendix]
2-
[[auto-configuration-classes]]
2+
[[appendix.auto-configuration-classes]]
33
= Auto-configuration Classes
44
include::attributes.adoc[]
55

spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes/actuator.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[[auto-configuration-classes.actuator]]
1+
[[appendix.auto-configuration-classes.actuator]]
22
== spring-boot-actuator-autoconfigure
33
The following auto-configuration classes are from the `spring-boot-actuator-autoconfigure` module:
44

spring-boot-project/spring-boot-docs/src/docs/asciidoc/auto-configuration-classes/core.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[[auto-configuration-classes.core]]
1+
[[appendix.auto-configuration-classes.core]]
22
== spring-boot-autoconfigure
33
The following auto-configuration classes are from the `spring-boot-autoconfigure` module:
44

spring-boot-project/spring-boot-docs/src/docs/asciidoc/build-tool-plugins/other-build-systems.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[build-tool-plugins.other-build-systems]]
22
== Supporting Other Build Systems
33
If you want to use a build tool other than Maven, Gradle, or Ant, you likely need to develop your own plugin.
4-
Executable jars need to follow a specific format and certain entries need to be written in an uncompressed form (see the "`<<executable-jar#executable-jar, executable jar format>>`" section in the appendix for details).
4+
Executable jars need to follow a specific format and certain entries need to be written in an uncompressed form (see the "`<<executable-jar#appendix.executable-jar, executable jar format>>`" section in the appendix for details).
55

66
The Spring Boot Maven and Gradle plugins both make use of `spring-boot-loader-tools` to actually generate jars.
77
If you need to, you may use this library directly.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[[build-tool-plugins.whats-next]]
22
== What to Read Next
33
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.
4-
More technical details of the executable jar format are covered in <<executable-jar#executable-jar,the appendix>>.
4+
More technical details of the executable jar format are covered in <<executable-jar#appendix.executable-jar,the appendix>>.
55

66
If you have specific build-related questions, you can check out the "`<<howto#howto, how-to>>`" guides.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/cli/using-the-cli.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Doing so consults Spring Boot's default dependency metadata to deduce the artifa
146146

147147
NOTE: The default metadata is tied to the version of the CLI that you use.
148148
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.
149-
A table showing the dependencies and their versions that are included in the default metadata can be found in the <<dependency-versions#dependency-versions,appendix>>.
149+
A table showing the dependencies and their versions that are included in the default metadata can be found in the <<dependency-versions#appendix.dependency-versions,appendix>>.
150150

151151

152152

spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[appendix]
2-
[[configuration-metadata]]
2+
[[appendix.configuration-metadata]]
33
= Configuration Metadata
44
include::attributes.adoc[]
55

@@ -9,7 +9,7 @@ Spring Boot jars include metadata files that provide details of all supported co
99
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.
1010

1111
The majority of the metadata file is generated automatically at compile time by processing all items annotated with `@ConfigurationProperties`.
12-
However, it is possible to <<configuration-metadata#configuration-metadata.annotation-processor.adding-additional-metadata,write part of the metadata manually>> for corner cases or more advanced use cases.
12+
However, it is possible to <<configuration-metadata#appendix.configuration-metadata.annotation-processor.adding-additional-metadata,write part of the metadata manually>> for corner cases or more advanced use cases.
1313

1414

1515

spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/annotation-processor.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
[[configuration-metadata.annotation-processor]]
1+
[[appendix.configuration-metadata.annotation-processor]]
22
== Generating Your Own Metadata by Using the Annotation Processor
33
You can easily generate your own configuration metadata file from items annotated with `@ConfigurationProperties` by using the `spring-boot-configuration-processor` jar.
44
The jar includes a Java annotation processor which is invoked as your project is compiled.
55

66

77

8-
[[configuration-metadata.annotation-processor.configuring]]
8+
[[appendix.configuration-metadata.annotation-processor.configuring]]
99
=== Configuring the Annotation Processor
1010
To use the processor, include a dependency on `spring-boot-configuration-processor`.
1111

@@ -59,7 +59,7 @@ You could also let the AspectJ plugin run all the processing and disable annotat
5959

6060

6161

62-
[[configuration-metadata.annotation-processor.automatic-metadata-generation]]
62+
[[appendix.configuration-metadata.annotation-processor.automatic-metadata-generation]]
6363
=== Automatic Metadata Generation
6464
The processor picks up both classes and methods that are annotated with `@ConfigurationProperties`.
6565

@@ -83,15 +83,15 @@ The annotation processor applies a number of heuristics to extract the default v
8383
Default values have to be provided statically. In particular, do not refer to a constant defined in another class.
8484
Also, the annotation processor cannot auto-detect default values for ``Enum``s and ``Collections``s.
8585

86-
For cases where the default value could not be detected, <<configuration-metadata#configuration-metadata.annotation-processor.adding-additional-metadata,manual metadata>> should be provided.
86+
For cases where the default value could not be detected, <<configuration-metadata#appendix.configuration-metadata.annotation-processor.adding-additional-metadata,manual metadata>> should be provided.
8787
Consider the following example:
8888

8989
[source,java,indent=0,subs="verbatim"]
9090
----
9191
include::{docs-java}/configurationmetadata/annotationprocessor/automaticmetadatageneration/MyMessagingProperties.java[]
9292
----
9393

94-
In order to document default values for properties in the class above, you could add the following content to <<configuration-metadata#configuration-metadata.annotation-processor.adding-additional-metadata,the manual metadata of the module>>:
94+
In order to document default values for properties in the class above, you could add the following content to <<configuration-metadata#appendix.configuration-metadata.annotation-processor.adding-additional-metadata,the manual metadata of the module>>:
9595

9696
[source,json,indent=0,subs="verbatim"]
9797
----
@@ -111,7 +111,7 @@ NOTE: Only the `name` of the property is required to document additional metadat
111111

112112

113113

114-
[[configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties]]
114+
[[appendix.configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties]]
115115
==== Nested Properties
116116
The annotation processor automatically considers inner classes as nested properties.
117117
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
129129

130130

131131

132-
[[configuration-metadata.annotation-processor.adding-additional-metadata]]
132+
[[appendix.configuration-metadata.annotation-processor.adding-additional-metadata]]
133133
=== Adding Additional Metadata
134134
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.
135135
You may also need to tune some attributes of an existing key.

0 commit comments

Comments
 (0)