Skip to content

Commit 4c8dafe

Browse files
committed
Migrate class references to full javadoc links
Update documentation to use `javadoc:...` macro for class and interface references. Migrated using https://github.com/philwebb/asciidoctor-javadoc-migration See gh-41614
1 parent 3d57d36 commit 4c8dafe

File tree

88 files changed

+1847
-1847
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1847
-1847
lines changed

spring-boot-project/spring-boot-docs/src/docs/antora/modules/ROOT/pages/upgrading.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ To enable that feature, add the following dependency to your project:
4141
</dependency>
4242
----
4343

44-
WARNING: Properties that are added late to the environment, such as when using `@PropertySource`, will not be taken into account.
44+
WARNING: Properties that are added late to the environment, such as when using javadoc:org.springframework.context.annotation.PropertySource[format=annotation], will not be taken into account.
4545

4646
NOTE: Once you finish the migration, please make sure to remove this module from your project's dependencies.
4747

spring-boot-project/spring-boot-docs/src/docs/antora/modules/build-tool-plugin/pages/other-build-systems.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ If you need to, you may use this library directly.
1212
[[build-tool-plugins.other-build-systems.repackaging-archives]]
1313
== Repackaging Archives
1414

15-
To repackage an existing archive so that it becomes a self-contained executable archive, use `org.springframework.boot.loader.tools.Repackager`.
16-
The `Repackager` class takes a single constructor argument that refers to an existing jar or war archive.
15+
To repackage an existing archive so that it becomes a self-contained executable archive, use javadoc:org.springframework.boot.loader.tools.Repackager[].
16+
The javadoc:org.springframework.boot.loader.tools.Repackager[] class takes a single constructor argument that refers to an existing jar or war archive.
1717
Use one of the two available `repackage()` methods to either replace the original file or write to a new destination.
1818
Various settings can also be configured on the repackager before it is run.
1919

@@ -22,8 +22,8 @@ Various settings can also be configured on the repackager before it is run.
2222
[[build-tool-plugins.other-build-systems.nested-libraries]]
2323
== Nested Libraries
2424

25-
When repackaging an archive, you can include references to dependency files by using the `org.springframework.boot.loader.tools.Libraries` interface.
26-
We do not provide any concrete implementations of `Libraries` here as they are usually build-system-specific.
25+
When repackaging an archive, you can include references to dependency files by using the javadoc:org.springframework.boot.loader.tools.Libraries[] interface.
26+
We do not provide any concrete implementations of javadoc:org.springframework.boot.loader.tools.Libraries[] here as they are usually build-system-specific.
2727

2828
If your archive already includes libraries, you can use javadoc:org.springframework.boot.loader.tools.Libraries#NONE[].
2929

spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/actuator.adoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ For more detail, see the javadoc:org.springframework.boot.actuate.autoconfigure.
2020
[[howto.actuator.customizing-sanitization]]
2121
== Customizing Sanitization
2222

23-
To take control over the sanitization, define a `SanitizingFunction` bean.
24-
The `SanitizableData` with which the function is called provides access to the key and value as well as the `org.springframework.core.env.PropertySource` from which they came.
23+
To take control over the sanitization, define a javadoc:org.springframework.boot.actuate.endpoint.SanitizingFunction[] bean.
24+
The javadoc:org.springframework.boot.actuate.endpoint.SanitizableData[] with which the function is called provides access to the key and value as well as the javadoc:org.springframework.core.env.PropertySource[] from which they came.
2525
This allows you to, for example, sanitize every value that comes from a particular property source.
26-
Each `SanitizingFunction` is called in order until a function changes the value of the sanitizable data.
26+
Each javadoc:org.springframework.boot.actuate.endpoint.SanitizingFunction[] is called in order until a function changes the value of the sanitizable data.
2727

2828

2929

3030
[[howto.actuator.map-health-indicators-to-metrics]]
3131
== Map Health Indicators to Micrometer Metrics
3232

33-
Spring Boot health indicators return a `org.springframework.boot.actuate.health.Status` type to indicate the overall system health.
33+
Spring Boot health indicators return a javadoc:org.springframework.boot.actuate.health.Status[] type to indicate the overall system health.
3434
If you want to monitor or alert on levels of health for a particular application, you can export these statuses as metrics with Micrometer.
3535
By default, the status codes "`UP`", "`DOWN`", "`OUT_OF_SERVICE`" and "`UNKNOWN`" are used by Spring Boot.
36-
To export these, you will need to convert these states to some set of numbers so that they can be used with a Micrometer `Gauge`.
36+
To export these, you will need to convert these states to some set of numbers so that they can be used with a Micrometer javadoc:io.micrometer.core.instrument.Gauge[].
3737

3838
The following example shows one way to write such an exporter:
3939

spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/application.adoc

+23-23
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ javadoc:org.springframework.boot.diagnostics.FailureAnalyzer[] is a great way to
1212
Spring Boot provides such an analyzer for application-context-related exceptions, JSR-303 validations, and more.
1313
You can also create your own.
1414

15-
`AbstractFailureAnalyzer` is a convenient extension of `FailureAnalyzer` that checks the presence of a specified exception type in the exception to handle.
15+
javadoc:org.springframework.boot.diagnostics.AbstractFailureAnalyzer[] is a convenient extension of javadoc:org.springframework.boot.diagnostics.FailureAnalyzer[] that checks the presence of a specified exception type in the exception to handle.
1616
You can extend from that so that your implementation gets a chance to handle the exception only when it is actually present.
1717
If, for whatever reason, you cannot handle the exception, return `null` to give another implementation a chance to handle the exception.
1818

19-
`FailureAnalyzer` implementations must be registered in `META-INF/spring.factories`.
19+
javadoc:org.springframework.boot.diagnostics.FailureAnalyzer[] implementations must be registered in `META-INF/spring.factories`.
2020
The following example registers `+ProjectConstraintViolationFailureAnalyzer+`:
2121

2222
[source,properties]
@@ -25,7 +25,7 @@ org.springframework.boot.diagnostics.FailureAnalyzer=\
2525
com.example.ProjectConstraintViolationFailureAnalyzer
2626
----
2727

28-
NOTE: If you need access to the `BeanFactory` or the `Environment`, declare them as constructor arguments in your `FailureAnalyzer` implementation.
28+
NOTE: If you need access to the javadoc:org.springframework.beans.factory.BeanFactory[] or the javadoc:org.springframework.core.env.Environment[], declare them as constructor arguments in your javadoc:org.springframework.boot.diagnostics.FailureAnalyzer[] implementation.
2929

3030

3131

@@ -34,7 +34,7 @@ NOTE: If you need access to the `BeanFactory` or the `Environment`, declare them
3434

3535
The Spring Boot auto-configuration tries its best to "`do the right thing`", but sometimes things fail, and it can be hard to tell why.
3636

37-
There is a really useful `ConditionEvaluationReport` available in any Spring Boot `ApplicationContext`.
37+
There is a really useful javadoc:org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport[] available in any Spring Boot javadoc:org.springframework.context.ApplicationContext[].
3838
You can see it if you enable `DEBUG` logging output.
3939
If you use the `spring-boot-actuator` (see the xref:actuator.adoc[] section), there is also a `conditions` endpoint that renders the report in JSON.
4040
Use that endpoint to debug the application and see what features have been added (and which have not been added) by Spring Boot at runtime.
@@ -46,58 +46,58 @@ When reading the code, remember the following rules of thumb:
4646
Pay special attention to the `+@Conditional*+` annotations to find out what features they enable and when.
4747
Add `--debug` to the command line or the System property `-Ddebug` to get a log on the console of all the auto-configuration decisions that were made in your app.
4848
In a running application with actuator enabled, look at the `conditions` endpoint (`/actuator/conditions` or the JMX equivalent) for the same information.
49-
* Look for classes that are `@ConfigurationProperties` (such as javadoc:org.springframework.boot.autoconfigure.web.ServerProperties[]) and read from there the available external configuration options.
50-
The `@ConfigurationProperties` annotation has a `name` attribute that acts as a prefix to external properties.
51-
Thus, `ServerProperties` has `prefix="server"` and its configuration properties are `server.port`, `server.address`, and others.
49+
* Look for classes that are javadoc:org.springframework.boot.context.properties.ConfigurationProperties[format=annotation] (such as javadoc:org.springframework.boot.autoconfigure.web.ServerProperties[]) and read from there the available external configuration options.
50+
The javadoc:org.springframework.boot.context.properties.ConfigurationProperties[format=annotation] annotation has a `name` attribute that acts as a prefix to external properties.
51+
Thus, javadoc:org.springframework.boot.autoconfigure.web.ServerProperties[] has `prefix="server"` and its configuration properties are `server.port`, `server.address`, and others.
5252
In a running application with actuator enabled, look at the `configprops` endpoint.
53-
* Look for uses of the `bind` method on the `Binder` to pull configuration values explicitly out of the `Environment` in a relaxed manner.
53+
* Look for uses of the `bind` method on the javadoc:org.springframework.boot.context.properties.bind.Binder[] to pull configuration values explicitly out of the javadoc:org.springframework.core.env.Environment[] in a relaxed manner.
5454
It is often used with a prefix.
55-
* Look for `@Value` annotations that bind directly to the `Environment`.
56-
* Look for `@ConditionalOnExpression` annotations that switch features on and off in response to SpEL expressions, normally evaluated with placeholders resolved from the `Environment`.
55+
* Look for javadoc:org.springframework.beans.factory.annotation.Value[format=annotation] annotations that bind directly to the javadoc:org.springframework.core.env.Environment[].
56+
* Look for javadoc:org.springframework.boot.autoconfigure.condition.ConditionalOnExpression[format=annotation] annotations that switch features on and off in response to SpEL expressions, normally evaluated with placeholders resolved from the javadoc:org.springframework.core.env.Environment[].
5757

5858

5959

6060
[[howto.application.customize-the-environment-or-application-context]]
6161
== Customize the Environment or ApplicationContext Before It Starts
6262

63-
A `SpringApplication` has `ApplicationListener` and `ApplicationContextInitializer` implementations that are used to apply customizations to the context or environment.
63+
A javadoc:org.springframework.boot.SpringApplication[] has javadoc:org.springframework.context.ApplicationListener[] and javadoc:org.springframework.context.ApplicationContextInitializer[] implementations that are used to apply customizations to the context or environment.
6464
Spring Boot loads a number of such customizations for use internally from `META-INF/spring.factories`.
6565
There is more than one way to register additional customizations:
6666

67-
* Programmatically, per application, by calling the `addListeners` and `addInitializers` methods on `SpringApplication` before you run it.
67+
* Programmatically, per application, by calling the `addListeners` and `addInitializers` methods on javadoc:org.springframework.boot.SpringApplication[] before you run it.
6868
* Declaratively, for all applications, by adding a `META-INF/spring.factories` and packaging a jar file that the applications all use as a library.
6969

70-
The `SpringApplication` sends some special `ApplicationEvents` to the listeners (some even before the context is created) and then registers the listeners for events published by the `ApplicationContext` as well.
70+
The javadoc:org.springframework.boot.SpringApplication[] sends some special javadoc:org.springframework.test.context.event.ApplicationEvents[] to the listeners (some even before the context is created) and then registers the listeners for events published by the javadoc:org.springframework.context.ApplicationContext[] as well.
7171
See xref:reference:features/spring-application.adoc#features.spring-application.application-events-and-listeners[] in the "`Spring Boot Features`" section for a complete list.
7272

73-
It is also possible to customize the `Environment` before the application context is refreshed by using `EnvironmentPostProcessor`.
73+
It is also possible to customize the javadoc:org.springframework.core.env.Environment[] before the application context is refreshed by using javadoc:org.springframework.boot.env.EnvironmentPostProcessor[].
7474
Each implementation should be registered in `META-INF/spring.factories`, as shown in the following example:
7575

7676
[source]
7777
----
7878
org.springframework.boot.env.EnvironmentPostProcessor=com.example.YourEnvironmentPostProcessor
7979
----
8080

81-
The implementation can load arbitrary files and add them to the `Environment`.
81+
The implementation can load arbitrary files and add them to the javadoc:org.springframework.core.env.Environment[].
8282
For instance, the following example loads a YAML configuration file from the classpath:
8383

8484
include-code::MyEnvironmentPostProcessor[]
8585

86-
TIP: The `Environment` has already been prepared with all the usual property sources that Spring Boot loads by default.
86+
TIP: The javadoc:org.springframework.core.env.Environment[] has already been prepared with all the usual property sources that Spring Boot loads by default.
8787
It is therefore possible to get the location of the file from the environment.
8888
The preceding example adds the `custom-resource` property source at the end of the list so that a key defined in any of the usual other locations takes precedence.
8989
A custom implementation may define another order.
9090

91-
CAUTION: While using `@PropertySource` on your `@SpringBootApplication` may seem to be a convenient way to load a custom resource in the `Environment`, we do not recommend it.
92-
Such property sources are not added to the `Environment` until the application context is being refreshed.
91+
CAUTION: While using javadoc:org.springframework.context.annotation.PropertySource[format=annotation] on your javadoc:org.springframework.boot.autoconfigure.SpringBootApplication[format=annotation] may seem to be a convenient way to load a custom resource in the javadoc:org.springframework.core.env.Environment[], we do not recommend it.
92+
Such property sources are not added to the javadoc:org.springframework.core.env.Environment[] until the application context is being refreshed.
9393
This is too late to configure certain properties such as `+logging.*+` and `+spring.main.*+` which are read before refresh begins.
9494

9595

9696

9797
[[howto.application.context-hierarchy]]
9898
== Build an ApplicationContext Hierarchy (Adding a Parent or Root Context)
9999

100-
You can use the `SpringApplicationBuilder` class to create parent/child `ApplicationContext` hierarchies.
100+
You can use the javadoc:org.springframework.boot.builder.SpringApplicationBuilder[] class to create parent/child javadoc:org.springframework.context.ApplicationContext[] hierarchies.
101101
See xref:reference:features/spring-application.adoc#features.spring-application.fluent-builder-api[] in the "`Spring Boot Features`" section for more information.
102102

103103

@@ -106,8 +106,8 @@ See xref:reference:features/spring-application.adoc#features.spring-application.
106106
== Create a Non-web Application
107107

108108
Not all Spring applications have to be web applications (or web services).
109-
If you want to execute some code in a `main` method but also bootstrap a Spring application to set up the infrastructure to use, you can use the `SpringApplication` features of Spring Boot.
110-
A `SpringApplication` changes its `ApplicationContext` class, depending on whether it thinks it needs a web application or not.
109+
If you want to execute some code in a `main` method but also bootstrap a Spring application to set up the infrastructure to use, you can use the javadoc:org.springframework.boot.SpringApplication[] features of Spring Boot.
110+
A javadoc:org.springframework.boot.SpringApplication[] changes its javadoc:org.springframework.context.ApplicationContext[] class, depending on whether it thinks it needs a web application or not.
111111
The first thing you can do to help it is to leave server-related dependencies (such as the servlet API) off the classpath.
112-
If you cannot do that (for example, if you run two applications from the same code base) then you can explicitly call `setWebApplicationType(WebApplicationType.NONE)` on your `SpringApplication` instance or set the `applicationContextClass` property (through the Java API or with external properties).
113-
Application code that you want to run as your business logic can be implemented as a `CommandLineRunner` and dropped into the context as a `@Bean` definition.
112+
If you cannot do that (for example, if you run two applications from the same code base) then you can explicitly call `setWebApplicationType(WebApplicationType.NONE)` on your javadoc:org.springframework.boot.SpringApplication[] instance or set the `applicationContextClass` property (through the Java API or with external properties).
113+
Application code that you want to run as your business logic can be implemented as a javadoc:org.springframework.boot.CommandLineRunner[] and dropped into the context as a javadoc:org.springframework.context.annotation.Bean[format=annotation] definition.

0 commit comments

Comments
 (0)