Skip to content

Commit de3744f

Browse files
committed
Use javadoc macro for more links in adoc files
See gh-41605
1 parent d95078d commit de3744f

File tree

12 files changed

+26
-26
lines changed

12 files changed

+26
-26
lines changed

Diff for: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/aot.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This section addresses those questions.
99
[[howto.aot.conditions]]
1010
== Conditions
1111

12-
Ahead-of-time processing optimizes the application and evaluates {url-spring-framework-javadoc}/org/springframework/context/annotation/Conditional.html[conditions] based on the environment at build time.
12+
Ahead-of-time processing optimizes the application and evaluates javadoc:{url-spring-framework-javadoc}/org.springframework.context.annotation.Conditional[format=annotation] annotations based on the environment at build time.
1313
xref:reference:features/profiles.adoc[Profiles] are implemented through conditions and are therefore affected, too.
1414

1515
If you want beans that are created based on a condition in an ahead-of-time optimized application, you have to set up the environment when building the application.

Diff for: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/batch.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Spring Batch expects a single `DataSource` by default.
1414
To have it use a `DataSource` other than the application’s main `DataSource`, declare a `DataSource` bean, annotating its `@Bean` method with `@BatchDataSource`.
1515
If you do so and want two data sources, remember to mark the other one `@Primary`.
1616
To take greater control, add `@EnableBatchProcessing` to one of your `@Configuration` classes or extend `DefaultBatchConfiguration`.
17-
See the API documentation of {url-spring-batch-javadoc}/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.html[`@EnableBatchProcessing`]
18-
and {url-spring-batch-javadoc}/org/springframework/batch/core/configuration/support/DefaultBatchConfiguration.html[`DefaultBatchConfiguration`] for more details.
17+
See the API documentation of javadoc:{url-spring-batch-javadoc}/org.springframework.batch.core.configuration.annotation.EnableBatchProcessing[format=annotation]
18+
and javadoc:{url-spring-batch-javadoc}/org.springframework.batch.core.configuration.support.DefaultBatchConfiguration[] for more details.
1919

2020
For more info about Spring Batch, see the {url-spring-batch-site}[Spring Batch project page].
2121

Diff for: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-access.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ Note that if you are using Spring Data REST, you must use the properties in the
366366
Spring Data REST can expose the `Repository` implementations as REST endpoints for you,
367367
provided Spring MVC has been enabled for the application.
368368

369-
Spring Boot exposes a set of useful properties (from the `spring.data.rest` namespace) that customize the {url-spring-data-rest-javadoc}/org/springframework/data/rest/core/config/RepositoryRestConfiguration.html[`RepositoryRestConfiguration`].
370-
If you need to provide additional customization, you should use a {url-spring-data-rest-javadoc}/org/springframework/data/rest/webmvc/config/RepositoryRestConfigurer.html[`RepositoryRestConfigurer`] bean.
369+
Spring Boot exposes a set of useful properties (from the `spring.data.rest` namespace) that customize the javadoc:{url-spring-data-rest-javadoc}/org.springframework.data.rest.core.config.RepositoryRestConfiguration[].
370+
If you need to provide additional customization, you should use a javadoc:{url-spring-data-rest-javadoc}/org.springframework.data.rest.webmvc.config.RepositoryRestConfigurer[] bean.
371371

372372
NOTE: If you do not specify any order on your custom `RepositoryRestConfigurer`, it runs after the one Spring Boot uses internally.
373373
If you need to specify an order, make sure it is higher than 0.

Diff for: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/nosql.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,12 @@ The auto-configuration configures this factory automatically if Netty is availab
188188
[[data.nosql.mongodb.template]]
189189
=== MongoTemplate
190190

191-
{url-spring-data-mongodb-site}[Spring Data MongoDB] provides a {url-spring-data-mongodb-javadoc}/org/springframework/data/mongodb/core/MongoTemplate.html[`MongoTemplate`] class that is very similar in its design to Spring's `JdbcTemplate`.
191+
{url-spring-data-mongodb-site}[Spring Data MongoDB] provides a javadoc:{url-spring-data-mongodb-javadoc}/org.springframework.data.mongodb.core.MongoTemplate[] class that is very similar in its design to Spring's `JdbcTemplate`.
192192
As with `JdbcTemplate`, Spring Boot auto-configures a bean for you to inject the template, as follows:
193193

194194
include-code::MyBean[]
195195

196-
See the {url-spring-data-mongodb-javadoc}/org/springframework/data/mongodb/core/MongoOperations.html[`MongoOperations`] API documentation for complete details.
196+
See the javadoc:{url-spring-data-mongodb-javadoc}/org.springframework.data.mongodb.core.MongoOperations[] API documentation for complete details.
197197

198198

199199

Diff for: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/sql.adoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ See the xref:how-to:data-access.adoc#howto.data-access.separate-entity-definitio
236236
JPA queries are created automatically from your method names.
237237
For example, a `CityRepository` interface might declare a `findAllByState(String state)` method to find all the cities in a given state.
238238

239-
For more complex queries, you can annotate your method with Spring Data's {url-spring-data-jpa-javadoc}/org/springframework/data/jpa/repository/Query.html[`Query`] annotation.
239+
For more complex queries, you can annotate your method with Spring Data's javadoc:{url-spring-data-jpa-javadoc}/org.springframework.data.jpa.repository.Query[] annotation.
240240

241-
Spring Data repositories usually extend from the {url-spring-data-commons-javadoc}/org/springframework/data/repository/Repository.html[`Repository`] or {url-spring-data-commons-javadoc}/org/springframework/data/repository/CrudRepository.html[`CrudRepository`] interfaces.
241+
Spring Data repositories usually extend from the javadoc:{url-spring-data-commons-javadoc}/org.springframework.data.repository.Repository[] or javadoc:{url-spring-data-commons-javadoc}/org.springframework.data.repository.CrudRepository[] interfaces.
242242
If you use auto-configuration, the xref:using/auto-configuration.adoc#using.auto-configuration.packages[auto-configuration packages] are searched for repositories.
243243

244244
TIP: You can customize the locations to look for repositories using `@EnableJpaRepositories`.
@@ -313,7 +313,7 @@ By default, the DDL execution (or validation) is deferred until the `Application
313313
[[data.sql.jpa-and-spring-data.open-entity-manager-in-view]]
314314
=== Open EntityManager in View
315315

316-
If you are running a web application, Spring Boot by default registers {url-spring-framework-javadoc}/org/springframework/orm/jpa/support/OpenEntityManagerInViewInterceptor.html[`OpenEntityManagerInViewInterceptor`] to apply the "`Open EntityManager in View`" pattern, to allow for lazy loading in web views.
316+
If you are running a web application, Spring Boot by default registers javadoc:{url-spring-framework-javadoc}/org.springframework.orm.jpa.support.OpenEntityManagerInViewInterceptor[] to apply the "`Open EntityManager in View`" pattern, to allow for lazy loading in web views.
317317
If you do not want this behavior, you should set `spring.jpa.open-in-view` to `false` in your `application.properties`.
318318

319319

@@ -541,9 +541,9 @@ https://spring.io/projects/spring-data-r2dbc[Spring Data R2DBC] repositories are
541541
Queries are created automatically from your method names.
542542
For example, a `CityRepository` interface might declare a `findAllByState(String state)` method to find all the cities in a given state.
543543

544-
For more complex queries, you can annotate your method with Spring Data's {url-spring-data-r2dbc-javadoc}/org/springframework/data/r2dbc/repository/Query.html[`Query`] annotation.
544+
For more complex queries, you can annotate your method with Spring Data's javadoc:{url-spring-data-r2dbc-javadoc}/org.springframework.data.r2dbc.repository.Query[format=annotation] annotation.
545545

546-
Spring Data repositories usually extend from the {url-spring-data-commons-javadoc}/org/springframework/data/repository/Repository.html[`Repository`] or {url-spring-data-commons-javadoc}/org/springframework/data/repository/CrudRepository.html[`CrudRepository`] interfaces.
546+
Spring Data repositories usually extend from the javadoc:{url-spring-data-commons-javadoc}/org.springframework.data.repository.Repository[] or javadoc:{url-spring-data-commons-javadoc}/org.springframework.data.repository.CrudRepository[] interfaces.
547547
If you use auto-configuration, the xref:using/auto-configuration.adoc#using.auto-configuration.packages[auto-configuration packages] are searched for repositories.
548548

549549
The following example shows a typical Spring Data repository interface definition:

Diff for: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Later property sources can override the values defined in earlier ones.
1111
Sources are considered in the following order:
1212

1313
. Default properties (specified by setting `SpringApplication.setDefaultProperties`).
14-
. {url-spring-framework-javadoc}/org/springframework/context/annotation/PropertySource.html[`@PropertySource`] annotations on your `@Configuration` classes.
14+
. javadoc:{url-spring-framework-javadoc}/org.springframework.context.annotation.PropertySource[format=annotation] annotations on your `@Configuration` classes.
1515
Please note that such property sources are not added to the `Environment` until the application context is being refreshed.
1616
This is too late to configure certain properties such as `+logging.*+` and `+spring.main.*+` which are read before refresh begins.
1717
. Config data (such as `application.properties` files).
@@ -25,8 +25,8 @@ Sources are considered in the following order:
2525
. Command line arguments.
2626
. `properties` attribute on your tests.
2727
Available on javadoc:org.springframework.boot.test.context.SpringBootTest[format=annotation] and the xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-tests[test annotations for testing a particular slice of your application].
28-
. {url-spring-framework-javadoc}/org/springframework/test/context/DynamicPropertySource.html[`@DynamicPropertySource`] annotations in your tests.
29-
. {url-spring-framework-javadoc}/org/springframework/test/context/TestPropertySource.html[`@TestPropertySource`] annotations on your tests.
28+
. javadoc:{url-spring-framework-javadoc}/org.springframework.test.context.DynamicPropertySource[format=annotation] annotations in your tests.
29+
. javadoc:{url-spring-framework-javadoc}/org.springframework.test.context.TestPropertySource[format=annotation] annotations on your tests.
3030
. xref:using/devtools.adoc#using.devtools.globalsettings[Devtools global settings properties] in the `$HOME/.config/spring-boot` directory when devtools is active.
3131

3232
Config data files are considered in the following order:

Diff for: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/spring-application.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ You can get more guidance about xref:how-to:deployment/cloud.adoc#howto.deployme
237237
[[features.spring-application.application-events-and-listeners]]
238238
== Application Events and Listeners
239239

240-
In addition to the usual Spring Framework events, such as {url-spring-framework-javadoc}/org/springframework/context/event/ContextRefreshedEvent.html[`ContextRefreshedEvent`], a `SpringApplication` sends some additional application events.
240+
In addition to the usual Spring Framework events, such as javadoc:{url-spring-framework-javadoc}/org.springframework.context.event.ContextRefreshedEvent[], a `SpringApplication` sends some additional application events.
241241

242242
[NOTE]
243243
====
@@ -373,7 +373,7 @@ TIP: If you want to know on which HTTP port the application is running, get the
373373

374374
During the application startup, the `SpringApplication` and the `ApplicationContext` perform many tasks related to the application lifecycle,
375375
the beans lifecycle or even processing application events.
376-
With {url-spring-framework-javadoc}/org/springframework/core/metrics/ApplicationStartup.html[`ApplicationStartup`], Spring Framework {url-spring-framework-docs}/core/beans/context-introduction.html#context-functionality-startup[allows you to track the application startup sequence with `StartupStep` objects].
376+
With javadoc:{url-spring-framework-javadoc}/org.springframework.core.metrics.ApplicationStartup[], Spring Framework {url-spring-framework-docs}/core/beans/context-introduction.html#context-functionality-startup[allows you to track the application startup sequence with `StartupStep` objects].
377377
This data can be collected for profiling purposes, or just to have a better understanding of an application startup process.
378378

379379
You can choose an `ApplicationStartup` implementation when setting up the `SpringApplication` instance.

Diff for: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/caching.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ TIP: It is also possible to transparently {url-spring-framework-docs}/integratio
3636

3737
The cache abstraction does not provide an actual store and relies on abstraction materialized by the `org.springframework.cache.Cache` and `org.springframework.cache.CacheManager` interfaces.
3838

39-
If you have not defined a bean of type `CacheManager` or a `CacheResolver` named `cacheResolver` (see {url-spring-framework-javadoc}/org/springframework/cache/annotation/CachingConfigurer.html[`CachingConfigurer`]), Spring Boot tries to detect the following providers (in the indicated order):
39+
If you have not defined a bean of type `CacheManager` or a `CacheResolver` named `cacheResolver` (see javadoc:{url-spring-framework-javadoc}/org.springframework.cache.annotation.CachingConfigurer[]), Spring Boot tries to detect the following providers (in the indicated order):
4040

4141
. xref:io/caching.adoc#io.caching.provider.generic[]
4242
. xref:io/caching.adoc#io.caching.provider.jcache[] (EhCache 3, Hazelcast, Infinispan, and others)

Diff for: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/rest-client.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ include-code::settings/MyService[]
134134
[[io.rest-client.resttemplate]]
135135
== RestTemplate
136136

137-
Spring Framework's {url-spring-framework-javadoc}/org/springframework/web/client/RestTemplate.html[`RestTemplate`] class predates `RestClient` and is the classic way that many applications use to call remote REST services.
137+
Spring Framework's javadoc:{url-spring-framework-javadoc}/org.springframework.web.client.RestTemplate[] class predates `RestClient` and is the classic way that many applications use to call remote REST services.
138138
You might choose to use `RestTemplate` when you have existing code that you don't want to migrate to `RestClient`, or because you're already familiar with the `RestTemplate` API.
139139

140140
Since `RestTemplate` instances often need to be customized before being used, Spring Boot does not provide any single auto-configured `RestTemplate` bean.

Diff for: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/amqp.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Spring's `AmqpTemplate` and `AmqpAdmin` are auto-configured, and you can autowir
5656

5757
include-code::MyBean[]
5858

59-
NOTE: {url-spring-amqp-javadoc}/org/springframework/amqp/rabbit/core/RabbitMessagingTemplate.html[`RabbitMessagingTemplate`] can be injected in a similar manner.
59+
NOTE: javadoc:{url-spring-amqp-javadoc}/org.springframework.amqp.rabbit.core.RabbitMessagingTemplate[] can be injected in a similar manner.
6060
If a `MessageConverter` bean is defined, it is associated automatically to the auto-configured `AmqpTemplate`.
6161

6262
If necessary, any `org.springframework.amqp.core.Queue` that is defined as a bean is automatically used to declare a corresponding queue on the RabbitMQ instance.
@@ -110,7 +110,7 @@ The following sample component creates a listener endpoint on the `someQueue` qu
110110

111111
include-code::MyBean[]
112112

113-
TIP: See {url-spring-amqp-javadoc}/org/springframework/amqp/rabbit/annotation/EnableRabbit.html[the Javadoc of `@EnableRabbit`] for more details.
113+
TIP: See javadoc:{url-spring-amqp-javadoc}/org.springframework.amqp.rabbit.annotation.EnableRabbit.html[format=annotation] for more details.
114114

115115
If you need to create more `RabbitListenerContainerFactory` instances or if you want to override the default, Spring Boot provides a `SimpleRabbitListenerContainerFactoryConfigurer` and a `DirectRabbitListenerContainerFactoryConfigurer` that you can use to initialize a `SimpleRabbitListenerContainerFactory` and a `DirectRabbitListenerContainerFactory` with the same settings as the factories used by the auto-configuration.
116116

Diff for: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/jms.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Spring's `JmsTemplate` is auto-configured, and you can autowire it directly into
132132

133133
include-code::MyBean[]
134134

135-
NOTE: {url-spring-framework-javadoc}/org/springframework/jms/core/JmsMessagingTemplate.html[`JmsMessagingTemplate`] can be injected in a similar manner.
135+
NOTE: javadoc:{url-spring-framework-javadoc}/org.springframework.jms.core.JmsMessagingTemplate[] can be injected in a similar manner.
136136
If a `DestinationResolver` or a `MessageConverter` bean is defined, it is associated automatically to the auto-configured `JmsTemplate`.
137137

138138

@@ -155,7 +155,7 @@ The following component creates a listener endpoint on the `someQueue` destinati
155155

156156
include-code::MyBean[]
157157

158-
TIP: See the {url-spring-framework-javadoc}/org/springframework/jms/annotation/EnableJms.html[`@EnableJms`] API documentation for more details.
158+
TIP: See the javadoc:{url-spring-framework-javadoc}/org.springframework.jms.annotation.EnableJms[format=annotation] API documentation for more details.
159159

160160
If you need to create more `JmsListenerContainerFactory` instances or if you want to override the default, Spring Boot provides a `DefaultJmsListenerContainerFactoryConfigurer` that you can use to initialize a `DefaultJmsListenerContainerFactory` with the same settings as the one that is auto-configured.
161161

Diff for: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/servlet.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ This can be useful when you want to re-order or remove some of the converters th
110110
=== MessageCodesResolver
111111

112112
Spring MVC has a strategy for generating error codes for rendering error messages from binding errors: `MessageCodesResolver`.
113-
If you set the configprop:spring.mvc.message-codes-resolver-format[] property `PREFIX_ERROR_CODE` or `POSTFIX_ERROR_CODE`, Spring Boot creates one for you (see the enumeration in {url-spring-framework-javadoc}/org/springframework/validation/DefaultMessageCodesResolver.Format.html[`DefaultMessageCodesResolver.Format`]).
113+
If you set the configprop:spring.mvc.message-codes-resolver-format[] property `PREFIX_ERROR_CODE` or `POSTFIX_ERROR_CODE`, Spring Boot creates one for you (see the enumeration in javadoc:{url-spring-framework-javadoc}/org.springframework.validation.DefaultMessageCodesResolver#Format[]).
114114

115115

116116

@@ -171,7 +171,7 @@ spring:
171171

172172
NOTE: Links to resources are rewritten in templates at runtime, thanks to a `ResourceUrlEncodingFilter` that is auto-configured for Thymeleaf and FreeMarker.
173173
You should manually declare this filter when using JSPs.
174-
Other template engines are currently not automatically supported but can be with custom template macros/helpers and the use of the {url-spring-framework-javadoc}/org/springframework/web/servlet/resource/ResourceUrlProvider.html[`ResourceUrlProvider`].
174+
Other template engines are currently not automatically supported but can be with custom template macros/helpers and the use of the javadoc:{url-spring-framework-javadoc}/org.springframework.web.servlet.resource.ResourceUrlProvider[].
175175

176176
When loading resources dynamically with, for example, a JavaScript module loader, renaming files is not an option.
177177
That is why other strategies are also supported and can be combined.
@@ -461,7 +461,7 @@ You should disable this behavior by setting `com.ibm.ws.webcontainer.invokeFlush
461461
https://en.wikipedia.org/wiki/Cross-origin_resource_sharing[Cross-origin resource sharing] (CORS) is a https://www.w3.org/TR/cors/[W3C specification] implemented by https://caniuse.com/#feat=cors[most browsers] that lets you specify in a flexible way what kind of cross-domain requests are authorized, instead of using some less secure and less powerful approaches such as IFRAME or JSONP.
462462

463463
As of version 4.2, Spring MVC {url-spring-framework-docs}/web/webmvc-cors.html[supports CORS].
464-
Using {url-spring-framework-docs}/web/webmvc-cors.html#mvc-cors-controller[controller method CORS configuration] with {url-spring-framework-javadoc}/org/springframework/web/bind/annotation/CrossOrigin.html[`@CrossOrigin`] annotations in your Spring Boot application does not require any specific configuration.
464+
Using {url-spring-framework-docs}/web/webmvc-cors.html#mvc-cors-controller[controller method CORS configuration] with javadoc:{url-spring-framework-javadoc}/org.springframework.web.bind.annotation.CrossOrigin[format=annotation] annotations in your Spring Boot application does not require any specific configuration.
465465
{url-spring-framework-docs}/web/webmvc-cors.html#mvc-cors-global[Global CORS configuration] can be defined by registering a `WebMvcConfigurer` bean with a customized `addCorsMappings(CorsRegistry)` method, as shown in the following example:
466466

467467
include-code::MyCorsConfiguration[]

0 commit comments

Comments
 (0)