Skip to content

Commit bd3f4d7

Browse files
committed
Rationalize reference documentation anchors
Closes gh-26296
1 parent 3d9eb9e commit bd3f4d7

17 files changed

+4147
-1040
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties

+3,107
Large diffs are not rendered by default.

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

+17-17
Original file line numberDiff line numberDiff line change
@@ -7,103 +7,103 @@ include::attributes.adoc[]
77
Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches.
88
This appendix provides a list of common Spring Boot properties and references to the underlying classes that consume them.
99

10-
TIP: Spring Boot provides various conversion mechanism with advanced value formatting, make sure to review <<spring-boot-features.adoc#boot-features-external-config-conversion, the properties conversion section>>.
10+
TIP: Spring Boot provides various conversion mechanism with advanced value formatting, make sure to review <<spring-boot-features.adoc#features.external-config.typesafe-configuration-properties.conversion, the properties conversion section>>.
1111

1212
NOTE: Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list.
1313
Also, you can define your own properties.
1414

1515

1616

17-
[[common-application-properties-core]]
17+
[[common-application-properties.core]]
1818
== Core Properties [[core-properties]]
1919
include::config-docs/core.adoc[]
2020

2121

2222

23-
[[common-application-properties-cache]]
23+
[[common-application-properties.cache]]
2424
== Cache Properties [[cache-properties]]
2525
include::config-docs/cache.adoc[]
2626

2727

2828

29-
[[common-application-properties-mail]]
29+
[[common-application-properties.mail]]
3030
== Mail Properties [[mail-properties]]
3131
include::config-docs/mail.adoc[]
3232

3333

3434

35-
[[common-application-properties-json]]
35+
[[common-application-properties.json]]
3636
== JSON Properties [[json-properties]]
3737
include::config-docs/json.adoc[]
3838

3939

4040

41-
[[common-application-properties-data]]
41+
[[common-application-properties.data]]
4242
== Data Properties [[data-properties]]
4343
include::config-docs/data.adoc[]
4444

4545

4646

47-
[[common-application-properties-transaction]]
47+
[[common-application-properties.transaction]]
4848
== Transaction Properties [[transaction-properties]]
4949
include::config-docs/transaction.adoc[]
5050

5151

5252

53-
[[common-application-properties-data-migration]]
53+
[[common-application-properties.data-migration]]
5454
== Data Migration Properties [[data-migration-properties]]
5555
include::config-docs/data-migration.adoc[]
5656

5757

5858

59-
[[common-application-properties-integration]]
59+
[[common-application-properties.integration]]
6060
== Integration Properties [[integration-properties]]
6161
include::config-docs/integration.adoc[]
6262

6363

6464

65-
[[common-application-properties-web]]
65+
[[common-application-properties.web]]
6666
== Web Properties [[web-properties]]
6767
include::config-docs/web.adoc[]
6868

6969

7070

71-
[[common-application-properties-templating]]
71+
[[common-application-properties.templating]]
7272
== Templating Properties [[templating-properties]]
7373
include::config-docs/templating.adoc[]
7474

7575

7676

77-
[[common-application-properties-server]]
77+
[[common-application-properties.server]]
7878
== Server Properties [[server-properties]]
7979
include::config-docs/server.adoc[]
8080

8181

8282

83-
[[common-application-properties-security]]
83+
[[common-application-properties.security]]
8484
== Security Properties [[security-properties]]
8585
include::config-docs/security.adoc[]
8686

8787

8888

89-
[[common-application-properties-rsocket]]
89+
[[common-application-properties.rsocket]]
9090
== RSocket Properties [[rsocket-properties]]
9191
include::config-docs/rsocket.adoc[]
9292

9393

9494

95-
[[common-application-properties-actuator]]
95+
[[common-application-properties.actuator]]
9696
== Actuator Properties [[actuator-properties]]
9797
include::config-docs/actuator.adoc[]
9898

9999

100100

101-
[[common-application-properties-devtools]]
101+
[[common-application-properties.devtools]]
102102
== Devtools Properties [[devtools-properties]]
103103
include::config-docs/devtools.adoc[]
104104

105105

106106

107-
[[common-application-properties-testing]]
107+
[[common-application-properties.testing]]
108108
== Testing Properties [[testing-properties]]
109109
include::config-docs/testing.adoc[]

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Remember to also look at the conditions report in your application for more deta
99

1010

1111

12-
[[auto-configuration-classes-from-autoconfigure-module]]
12+
[[auto-configuration-classes.core]]
1313
== spring-boot-autoconfigure
1414
The following auto-configuration classes are from the `spring-boot-autoconfigure` module:
1515

1616
include::auto-configuration-classes/spring-boot-autoconfigure.adoc[]
1717

1818

1919

20-
[[auto-configuration-classes-from-actuator]]
20+
[[auto-configuration-classes.actuator]]
2121
== spring-boot-actuator-autoconfigure
2222
The following auto-configuration classes are from the `spring-boot-actuator-autoconfigure` module:
2323

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

+26-26
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Spring Boot jars include metadata files that provide details of all supported co
77
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.
88

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

1212

1313

14-
[[configuration-metadata-format]]
14+
[[configuration-metadata.format]]
1515
== Metadata Format
1616
Configuration metadata files are located inside jars under `META-INF/spring-configuration-metadata.json`.
1717
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:
@@ -98,7 +98,7 @@ For example, when a developer is configuring the configprop:spring.jpa.hibernate
9898

9999

100100

101-
[[configuration-metadata-group-attributes]]
101+
[[configuration-metadata.format.group]]
102102
=== Group Attributes
103103
The JSON object contained in the `groups` array can contain the attributes shown in the following table:
104104

@@ -139,7 +139,7 @@ The JSON object contained in the `groups` array can contain the attributes shown
139139

140140

141141

142-
[[configuration-metadata-property-attributes]]
142+
[[configuration-metadata.format.property]]
143143
=== Property Attributes
144144
The JSON object contained in the `properties` array can contain the attributes described in the following table:
145145

@@ -254,7 +254,7 @@ Doing so is particularly useful when a `replacement` is provided.
254254

255255

256256

257-
[[configuration-metadata-hints-attributes]]
257+
[[configuration-metadata.format.hints]]
258258
=== Hint Attributes
259259
The JSON object contained in the `hints` array can contain the attributes shown in the following table:
260260

@@ -317,15 +317,15 @@ The JSON object contained in the `providers` attribute of each `hint` element ca
317317

318318

319319

320-
[[configuration-metadata-repeated-items]]
320+
[[configuration-metadata.format.repeated-items]]
321321
=== Repeated Metadata Items
322322
Objects with the same "`property`" and "`group`" name can appear multiple times within a metadata file.
323323
For example, you could bind two separate classes to the same prefix, with each having potentially overlapping property names.
324324
While the same names appearing in the metadata multiple times should not be common, consumers of metadata should take care to ensure that they support it.
325325

326326

327327

328-
[[configuration-metadata-providing-manual-hints]]
328+
[[configuration-metadata.manual-hints]]
329329
== Providing Manual Hints
330330
To improve the user experience and further assist the user in configuring a given property, you can provide additional metadata that:
331331

@@ -334,10 +334,10 @@ To improve the user experience and further assist the user in configuring a give
334334

335335

336336

337-
[[configuration-metadata-providing-manual-hints-value-hint]]
337+
[[configuration-metadata.manual-hints.value-hint]]
338338
=== Value Hint
339339
The `name` attribute of each hint refers to the `name` of a property.
340-
In the <<configuration-metadata-format,initial example shown earlier>>, we provide five values for the `spring.jpa.hibernate.ddl-auto` property: `none`, `validate`, `update`, `create`, and `create-drop`.
340+
In the <<configuration-metadata.format,initial example shown earlier>>, we provide five values for the `spring.jpa.hibernate.ddl-auto` property: `none`, `validate`, `update`, `create`, and `create-drop`.
341341
Each value may have a description as well.
342342

343343
If your property is of type `Map`, you can provide hints for both the keys and the values (but not for the map itself).
@@ -356,7 +356,7 @@ Assume a `sample.contexts` maps magic `String` values to an integer, as shown in
356356
----
357357

358358
The magic values are (in this example) are `sample1` and `sample2`.
359-
In order to offer additional content assistance for the keys, you could add the following JSON to <<configuration-metadata-additional-metadata,the manual metadata of the module>>:
359+
In order to offer additional content assistance for the keys, you could add the following JSON to <<configuration-metadata.annotation-processor.adding-additional-metadata,the manual metadata of the module>>:
360360

361361
[source,json,indent=0]
362362
----
@@ -380,7 +380,7 @@ If your IDE supports it, this is by far the most effective approach to auto-comp
380380

381381

382382

383-
[[configuration-metadata-providing-manual-hints-value-providers]]
383+
[[configuration-metadata.manual-hints.value-providers]]
384384
=== Value Providers
385385
Providers are a powerful way to attach semantics to a property.
386386
In this section, we define the official providers that you can use for your own hints.
@@ -407,7 +407,7 @@ The following table summarizes the list of supported providers:
407407
| Handles the property as if it were defined by the type defined by the mandatory `target` parameter.
408408

409409
| `logger-name`
410-
| Auto-completes valid logger names and <<spring-boot-features.adoc#boot-features-custom-log-groups,logger groups>>.
410+
| Auto-completes valid logger names and <<spring-boot-features.adoc#features.logging.log-groups,logger groups>>.
411411
Typically, package and class names available in the current project can be auto-completed as well as defined groups.
412412

413413
| `spring-bean-reference`
@@ -424,7 +424,7 @@ If no provider for a given property is supported, no special content assistance
424424

425425

426426

427-
[[configuration-metadata-providing-manual-hints-any]]
427+
[[configuration-metadata.manual-hints.value-providers.any]]
428428
==== Any
429429
The special **any** provider value permits any additional values to be provided.
430430
Regular value validation based on the property type should be applied if this is supported.
@@ -459,7 +459,7 @@ Note that, in the preceding example, any other value is also allowed.
459459

460460

461461

462-
[[configuration-metadata-providing-manual-hints-class-reference]]
462+
[[configuration-metadata.manual-hints.value-providers.class-reference]]
463463
==== Class Reference
464464
The **class-reference** provider auto-completes classes available in the project.
465465
This provider supports the following parameters:
@@ -503,7 +503,7 @@ The following metadata snippet corresponds to the standard `server.servlet.jsp.c
503503

504504

505505

506-
[[configuration-metadata-providing-manual-hints-handle-as]]
506+
[[configuration-metadata.manual-hints.value-providers.handle-as]]
507507
==== Handle As
508508
The **handle-as** provider lets you substitute the type of the property to a more high-level type.
509509
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.
@@ -553,9 +553,9 @@ It is actually used internally as a `org.springframework.core.io.Resource` but c
553553

554554

555555

556-
[[configuration-metadata-providing-manual-hints-logger-name]]
556+
[[configuration-metadata.manual-hints.value-providers.logger-name]]
557557
==== Logger Name
558-
The **logger-name** provider auto-completes valid logger names and <<spring-boot-features.adoc#boot-features-custom-log-groups,logger groups>>.
558+
The **logger-name** provider auto-completes valid logger names and <<spring-boot-features.adoc#features.logging.log-groups,logger groups>>.
559559
Typically, package and class names available in the current project can be auto-completed.
560560
If groups are enabled (default) and if a custom logger group is identified in the configuration, auto-completion for it should be provided.
561561
Specific frameworks may have extra magic logger names that can be supported as well.
@@ -640,7 +640,7 @@ As Spring Boot defines a few logger groups out-of-the-box, dedicated value hints
640640

641641

642642

643-
[[configuration-metadata-providing-manual-hints-spring-bean-reference]]
643+
[[configuration-metadata.manual-hints.value-providers.spring-bean-reference]]
644644
==== Spring Bean Reference
645645
The **spring-bean-reference** provider auto-completes the beans that are defined in the configuration of the current project.
646646
This provider supports the following parameters:
@@ -680,7 +680,7 @@ If you provide that hint, you still need to transform the bean name into an actu
680680

681681

682682

683-
[[configuration-metadata-providing-manual-hints-spring-profile-name]]
683+
[[configuration-metadata.manual-hints.value-providers.spring-profile-name]]
684684
==== Spring Profile Name
685685
The **spring-profile-name** provider auto-completes the Spring profiles that are defined in the configuration of the current project.
686686

@@ -702,14 +702,14 @@ The following metadata snippet corresponds to the standard `spring.profiles.acti
702702

703703

704704

705-
[[configuration-metadata-annotation-processor]]
705+
[[configuration-metadata.annotation-processor]]
706706
== Generating Your Own Metadata by Using the Annotation Processor
707707
You can easily generate your own configuration metadata file from items annotated with `@ConfigurationProperties` by using the `spring-boot-configuration-processor` jar.
708708
The jar includes a Java annotation processor which is invoked as your project is compiled.
709709

710710

711711

712-
[[configuration-metadata-annotation-processor-setup]]
712+
[[configuration-metadata.annotation-processor.configuring]]
713713
=== Configuring the Annotation Processor
714714
To use the processor, include a dependency on `spring-boot-configuration-processor`.
715715

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

764764

765765

766-
[[configuration-metadata-annotation-processor-metadata-generation]]
766+
[[configuration-metadata.annotation-processor.automatic-metadata-generation]]
767767
=== Automatic Metadata Generation
768768
The processor picks up both classes and methods that are annotated with `@ConfigurationProperties`.
769769

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

810-
For cases where the default value could not be detected, <<configuration-metadata-additional-metadata,manual metadata>> should be provided.
810+
For cases where the default value could not be detected, <<configuration-metadata.annotation-processor.adding-additional-metadata,manual metadata>> should be provided.
811811
Consider the following example:
812812

813813
[source,java,pending-extract=true,indent=0,subs="verbatim,quotes,attributes"]
@@ -831,7 +831,7 @@ Consider the following example:
831831
}
832832
----
833833

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

836836
[source,json,indent=0]
837837
----
@@ -851,7 +851,7 @@ NOTE: Only the `name` of the property is required to document additional metadat
851851

852852

853853

854-
[[configuration-metadata-annotation-processor-metadata-generation-nested]]
854+
[[configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties]]
855855
==== Nested Properties
856856
The annotation processor automatically considers inner classes as nested properties.
857857
Rather than documenting the `ip` and `port` at the root of the namespace, we could create a sub-namespace for it.
@@ -888,7 +888,7 @@ TIP: This has no effect on collections and maps, as those types are automaticall
888888

889889

890890

891-
[[configuration-metadata-additional-metadata]]
891+
[[configuration-metadata.annotation-processor.adding-additional-metadata]]
892892
=== Adding Additional Metadata
893893
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.
894894
You may also need to tune some attributes of an existing key.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/appendix-dependency-versions.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This appendix provides details of the dependencies that are managed by Spring Bo
77

88

99

10-
[[dependency-versions-coordinates]]
10+
[[dependency-versions.coordinates]]
1111
== Managed Dependency Coordinates
1212

1313
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.
@@ -17,7 +17,7 @@ include::dependency-versions.adoc[]
1717

1818

1919

20-
[[dependency-versions-properties]]
20+
[[dependency-versions.properties]]
2121
== Version Properties
2222

2323
The following table provides all properties that can be used to override the versions managed by Spring Boot.

0 commit comments

Comments
 (0)