Skip to content

Commit 8567402

Browse files
authored
Extract recurring asciidoc links to attributes, cleanup old doc files
This commit extract spring-related links and recurring external links into asciidoctor attributes to be used by the Antora toolchain. It notably homogenizes links to: - IETF RFCs - Java Community Process JSRs - the Java API Documentation (on the Java 17 version) - Kotlin documentations (on the Kotlinlang.org version) - the Spring Boot reference guide (on the `html` version) This commit also reworks most link attributes to follow a Project-Category-Misc syntax. For example, `spring-boot-docs` rather than `docs-spring-boot`. Finally, it makes an effort to clean up remainders from the previous documentation toolchain, namely the `docs/asciidoc` folder and `modules/ROOT/pages/attributes.adoc` file. Closes spring-projectsgh-26864 Closes spring-projectsgh-31619
1 parent 4cc43b4 commit 8567402

File tree

202 files changed

+594
-2837
lines changed

Some content is hidden

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

202 files changed

+594
-2837
lines changed

framework-docs/antora.yml

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,73 @@ asciidoc:
1717
# FIXME: the copyright is not removed
1818
# FIXME: The package is not renamed
1919
chomp: 'all'
20+
fold: 'all'
2021
include-java: 'example$docs-src/main/java/org/springframework/docs'
21-
spring-framework-main-code: 'https://github.com/spring-projects/spring-framework/tree/main'
22+
spring-site: 'https://spring.io'
23+
spring-site-blog: '{spring-site}/blog'
24+
spring-site-cve: "{spring-site}/security"
25+
spring-site-guides: '{spring-site}/guides'
26+
spring-site-projects: '{spring-site}/projects'
27+
spring-site-tools: "{spring-site}/tools"
28+
spring-org: 'spring-projects'
29+
spring-github-org: "https://github.com/{spring-org}"
30+
spring-framework-github: "https://github.com/{spring-org}/spring-framework"
31+
spring-framework-code: '{spring-framework-github}/tree/main'
32+
spring-framework-issues: '{spring-framework-github}/issues'
33+
spring-framework-wiki: '{spring-framework-github}/wiki'
34+
# Docs
2235
docs-site: 'https://docs.spring.io'
23-
docs-spring: "{docs-site}/spring-framework/docs/{spring-version}"
24-
docs-spring-framework: '{docs-site}/spring-framework/docs/{spring-version}'
25-
api-spring-framework: '{docs-spring-framework}/javadoc-api/org/springframework'
26-
docs-graalvm: 'https://www.graalvm.org/22.3/reference-manual'
27-
docs-spring-boot: '{docs-site}/spring-boot/docs/current/reference'
36+
spring-framework-docs-root: '{docs-site}/spring-framework/docs'
37+
spring-framework-api: '{spring-framework-docs-root}/{spring-version}/javadoc-api/org/springframework'
38+
spring-framework-api-kdoc: '{spring-framework-docs-root}/{spring-version}/kdoc-api'
39+
spring-framework-reference: '{spring-framework-docs-root}/{spring-version}/reference'
40+
#
41+
# Other Spring portfolio projects
42+
spring-boot-docs: '{docs-site}/spring-boot/docs/current/reference/html'
43+
spring-boot-issues: '{spring-github-org}/spring-boot/issues'
44+
# TODO add more projects / links or just build up on {docs-site}?
45+
# TODO rename the below using new conventions
2846
docs-spring-gemfire: '{docs-site}/spring-gemfire/docs/current/reference'
2947
docs-spring-security: '{docs-site}/spring-security/reference'
30-
gh-rsocket: 'https://github.com/rsocket'
31-
gh-rsocket-extensions: '{gh-rsocket}/rsocket/blob/master/Extensions'
32-
gh-rsocket-java: '{gh-rsocket}/rsocket-java{gh-rsocket}/rsocket-java'
48+
docs-spring-session: '{docs-site}/spring-session/reference'
49+
#
50+
# External projects URLs and related attributes
51+
aspectj-site: 'https://www.eclipse.org/aspectj'
52+
aspectj-docs: "{aspectj-site}/doc/released"
53+
aspectj-api: "{aspectj-docs}/runtime-api"
54+
aspectj-docs-devguide: "{aspectj-docs}/devguide"
55+
aspectj-docs-progguide: "{aspectj-docs}/progguide"
56+
assertj-docs: 'https://assertj.github.io/doc'
57+
baeldung-blog: 'https://www.baeldung.com'
58+
bean-validation-site: 'https://beanvalidation.org'
59+
graalvm-docs: 'https://www.graalvm.org/22.3/reference-manual'
60+
hibernate-validator-site: 'https://hibernate.org/validator/'
61+
jackson-docs: 'https://fasterxml.github.io'
62+
jackson-github-org: 'https://github.com/FasterXML'
63+
java-api: 'https://docs.oracle.com/en/java/javase/17/docs/api'
64+
java-tutorial: 'https://docs.oracle.com/javase/tutorial'
65+
JSR: 'https://www.jcp.org/en/jsr/detail?id='
66+
kotlin-site: 'https://kotlinlang.org'
67+
kotlin-docs: '{kotlin-site}/docs'
68+
kotlin-api: '{kotlin-site}/api/latest'
69+
kotlin-coroutines-api: '{kotlin-site}/api/kotlinx.coroutines'
70+
kotlin-github-org: 'https://github.com/Kotlin'
71+
kotlin-issues: 'https://youtrack.jetbrains.com/issue'
72+
reactive-streams-site: 'https://www.reactive-streams.org'
73+
reactive-streams-spec: 'https://github.com/reactive-streams/reactive-streams-jvm/blob/master/README.md#specification'
74+
reactor-github-org: 'https://github.com/reactor'
75+
reactor-site: 'https://projectreactor.io'
76+
rsocket-github-org: 'https://github.com/rsocket'
77+
rsocket-java: '{rsocket-github-org}/rsocket-java'
78+
rsocket-java-code: '{rsocket-java}/tree/master/'
79+
rsocket-protocol-extensions: '{rsocket-github-org}/rsocket/tree/master/Extensions'
80+
rsocket-site: 'https://rsocket.io'
81+
rfc-site: 'https://datatracker.ietf.org/doc/html'
82+
sockjs-client: 'https://github.com/sockjs/sockjs-client'
83+
sockjs-protocol: 'https://github.com/sockjs/sockjs-protocol'
84+
sockjs-protocol-site: "https://sockjs.github.io/sockjs-protocol"
85+
stackoverflow-site: 'https://stackoverflow.com'
86+
stackoverflow-questions: '{stackoverflow-site}/questions'
87+
stackoverflow-spring-tag: "{stackoverflow-questions}/tagged/spring"
88+
stackoverflow-spring-kotlin-tags: "{stackoverflow-spring-tag}+kotlin"
89+
testcontainers-site: 'https://www.testcontainers.org'

framework-docs/modules/ROOT/nav.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,4 +439,4 @@
439439
** xref:languages/groovy.adoc[]
440440
** xref:languages/dynamic.adoc[]
441441
* xref:appendix.adoc[]
442-
* https://github.com/spring-projects/spring-framework/wiki[Wiki]
442+
* {spring-framework-wiki}[Wiki]

framework-docs/modules/ROOT/pages/appendix.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ within the core Spring Framework.
88
[[appendix-spring-properties]]
99
== Spring Properties
1010

11-
{api-spring-framework}/core/SpringProperties.html[`SpringProperties`] is a static holder
11+
{spring-framework-api}/core/SpringProperties.html[`SpringProperties`] is a static holder
1212
for properties that control certain low-level aspects of the Spring Framework. Users can
1313
configure these properties via JVM system properties or programmatically via the
1414
`SpringProperties.setProperty(String key, String value)` method. The latter may be
@@ -25,7 +25,7 @@ The following table lists all currently supported Spring properties.
2525
| `spring.beaninfo.ignore`
2626
| Instructs Spring to use the `Introspector.IGNORE_ALL_BEANINFO` mode when calling the
2727
JavaBeans `Introspector`. See
28-
{api-spring-framework}++/beans/StandardBeanInfoFactory.html#IGNORE_BEANINFO_PROPERTY_NAME++[`CachedIntrospectionResults`]
28+
{spring-framework-api}++/beans/StandardBeanInfoFactory.html#IGNORE_BEANINFO_PROPERTY_NAME++[`CachedIntrospectionResults`]
2929
for details.
3030

3131
| `spring.expression.compiler.mode`
@@ -36,7 +36,7 @@ xref:core/expressions/evaluation.adoc#expressions-compiler-configuration[Spring
3636
| Instructs Spring to ignore operating system environment variables if a Spring
3737
`Environment` property -- for example, a placeholder in a configuration String -- isn't
3838
resolvable otherwise. See
39-
{api-spring-framework}++/core/env/AbstractEnvironment.html#IGNORE_GETENV_PROPERTY_NAME++[`AbstractEnvironment`]
39+
{spring-framework-api}++/core/env/AbstractEnvironment.html#IGNORE_GETENV_PROPERTY_NAME++[`AbstractEnvironment`]
4040
for details.
4141

4242
| `spring.jdbc.getParameterType.ignore`
@@ -47,12 +47,12 @@ See the note in xref:data-access/jdbc/advanced.adoc#jdbc-batch-list[Batch Operat
4747
| Instructs Spring to ignore a default JNDI environment, as an optimization for scenarios
4848
where nothing is ever to be found for such JNDI fallback searches to begin with, avoiding
4949
the repeated JNDI lookup overhead. See
50-
{api-spring-framework}++/jndi/JndiLocatorDelegate.html#IGNORE_JNDI_PROPERTY_NAME++[`JndiLocatorDelegate`]
50+
{spring-framework-api}++/jndi/JndiLocatorDelegate.html#IGNORE_JNDI_PROPERTY_NAME++[`JndiLocatorDelegate`]
5151
for details.
5252

5353
| `spring.objenesis.ignore`
5454
| Instructs Spring to ignore Objenesis, not even attempting to use it. See
55-
{api-spring-framework}++/objenesis/SpringObjenesis.html#IGNORE_OBJENESIS_PROPERTY_NAME++[`SpringObjenesis`]
55+
{spring-framework-api}++/objenesis/SpringObjenesis.html#IGNORE_OBJENESIS_PROPERTY_NAME++[`SpringObjenesis`]
5656
for details.
5757

5858
| `spring.test.aot.processing.failOnError`

framework-docs/modules/ROOT/pages/attributes.adoc

Lines changed: 0 additions & 20 deletions
This file was deleted.

framework-docs/modules/ROOT/pages/core/aop-api/extensibility.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ support for new custom advice types be added without changing the core framework
1212
The only constraint on a custom `Advice` type is that it must implement the
1313
`org.aopalliance.aop.Advice` marker interface.
1414

15-
See the {api-spring-framework}/aop/framework/adapter/package-summary.html[`org.springframework.aop.framework.adapter`]
15+
See the {spring-framework-api}/aop/framework/adapter/package-summary.html[`org.springframework.aop.framework.adapter`]
1616
javadoc for further information.

framework-docs/modules/ROOT/pages/core/aop-api/targetsource.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ The following listing shows an example configuration:
119119

120120
Note that the target object (`businessObjectTarget` in the preceding example) must be a
121121
prototype. This lets the `PoolingTargetSource` implementation create new instances
122-
of the target to grow the pool as necessary. See the {api-spring-framework}/aop/target/AbstractPoolingTargetSource.html[javadoc of
122+
of the target to grow the pool as necessary. See the {spring-framework-api}/aop/target/AbstractPoolingTargetSource.html[javadoc of
123123
`AbstractPoolingTargetSource`] and the concrete subclass you wish to use for information
124124
about its properties. `maxSize` is the most basic and is always guaranteed to be present.
125125

framework-docs/modules/ROOT/pages/core/aop/aspectj-programmatic.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Kotlin::
5252
----
5353
======
5454

55-
See the {api-spring-framework}/aop/aspectj/annotation/AspectJProxyFactory.html[javadoc] for more information.
55+
See the {spring-framework-api}/aop/aspectj/annotation/AspectJProxyFactory.html[javadoc] for more information.
5656

5757

5858

framework-docs/modules/ROOT/pages/core/aop/ataspectj.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
@AspectJ refers to a style of declaring aspects as regular Java classes annotated with
66
annotations. The @AspectJ style was introduced by the
7-
https://www.eclipse.org/aspectj[AspectJ project] as part of the AspectJ 5 release. Spring
7+
{aspectj-site}[AspectJ project] as part of the AspectJ 5 release. Spring
88
interprets the same annotations as AspectJ 5, using a library supplied by AspectJ
99
for pointcut parsing and matching. The AOP runtime is still pure Spring AOP, though, and
1010
there is no dependency on the AspectJ compiler or weaver.

framework-docs/modules/ROOT/pages/core/aop/ataspectj/advice.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ The `JoinPoint` interface provides a number of useful methods:
482482
* `getSignature()`: Returns a description of the method that is being advised.
483483
* `toString()`: Prints a useful description of the method being advised.
484484

485-
See the https://www.eclipse.org/aspectj/doc/released/runtime-api/org/aspectj/lang/JoinPoint.html[javadoc] for more detail.
485+
See the {aspectj-api}/org/aspectj/lang/JoinPoint.html[javadoc] for more detail.
486486

487487
[[aop-ataspectj-advice-params-passing]]
488488
=== Passing Parameters to Advice
@@ -730,7 +730,7 @@ of determining parameter names, an exception will be thrown.
730730
flag for `javac`. Recommended approach on Java 8+.
731731
`AspectJAdviceParameterNameDiscoverer` :: Deduces parameter names from the pointcut
732732
expression, `returning`, and `throwing` clauses. See the
733-
{api-spring-framework}/aop/aspectj/AspectJAdviceParameterNameDiscoverer.html[javadoc]
733+
{spring-framework-api}/aop/aspectj/AspectJAdviceParameterNameDiscoverer.html[javadoc]
734734
for details on the algorithm used.
735735

736736
[[aop-ataspectj-advice-params-names-explicit]]

framework-docs/modules/ROOT/pages/core/aop/ataspectj/pointcuts.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Kotlin::
3636

3737
The pointcut expression that forms the value of the `@Pointcut` annotation is a regular
3838
AspectJ pointcut expression. For a full discussion of AspectJ's pointcut language, see
39-
the https://www.eclipse.org/aspectj/doc/released/progguide/index.html[AspectJ
39+
the {aspectj-docs-progguide}/index.html[AspectJ
4040
Programming Guide] (and, for extensions, the
41-
https://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html[AspectJ 5
41+
{aspectj-docs}/adk15notebook/index.html[AspectJ 5
4242
Developer's Notebook]) or one of the books on AspectJ (such as _Eclipse AspectJ_, by Colyer
4343
et al., or _AspectJ in Action_, by Ramnivas Laddad).
4444

@@ -392,7 +392,7 @@ method that takes no parameters, whereas `(..)` matches any number (zero or more
392392
The `({asterisk})` pattern matches a method that takes one parameter of any type.
393393
`(*,String)` matches a method that takes two parameters. The first can be of any type, while the
394394
second must be a `String`. Consult the
395-
https://www.eclipse.org/aspectj/doc/released/progguide/semantics-pointcuts.html[Language
395+
{aspectj-docs-progguide}/semantics-pointcuts.html[Language
396396
Semantics] section of the AspectJ Programming Guide for more information.
397397

398398
The following examples show some common pointcut expressions:

framework-docs/modules/ROOT/pages/core/aop/resources.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
= Further Resources
33
:page-section-summary-toc: 1
44

5-
More information on AspectJ can be found on the https://www.eclipse.org/aspectj[AspectJ website].
5+
More information on AspectJ can be found on the {aspectj-site}[AspectJ website].
66

77
_Eclipse AspectJ_ by Adrian Colyer et. al. (Addison-Wesley, 2005) provides a
88
comprehensive introduction and reference for the AspectJ language.

framework-docs/modules/ROOT/pages/core/aop/using-aspectj.adoc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ using Spring in accordance with the properties of the annotation". In this conte
136136
"initialization" refers to newly instantiated objects (for example, objects instantiated
137137
with the `new` operator) as well as to `Serializable` objects that are undergoing
138138
deserialization (for example, through
139-
https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html[readResolve()]).
139+
{java-api}/java.base/java/io/Serializable.html[readResolve()]).
140140

141141
[NOTE]
142142
=====
@@ -168,14 +168,13 @@ Kotlin::
168168
169169
You can find more information about the language semantics of the various pointcut
170170
types in AspectJ
171-
https://www.eclipse.org/aspectj/doc/next/progguide/semantics-joinPoints.html[in this
172-
appendix] of the https://www.eclipse.org/aspectj/doc/next/progguide/index.html[AspectJ
173-
Programming Guide].
171+
{aspectj-docs-progguide}/semantics-joinPoints.html[in this appendix] of the
172+
{aspectj-docs-progguide}/index.html[AspectJ Programming Guide].
174173
=====
175174

176175
For this to work, the annotated types must be woven with the AspectJ weaver. You can
177176
either use a build-time Ant or Maven task to do this (see, for example, the
178-
https://www.eclipse.org/aspectj/doc/released/devguide/antTasks.html[AspectJ Development
177+
{aspectj-docs-devguide}/antTasks.html[AspectJ Development
179178
Environment Guide]) or load-time weaving (see xref:core/aop/using-aspectj.adoc#aop-aj-ltw[Load-time Weaving with AspectJ in the Spring Framework]). The
180179
`AnnotationBeanConfigurerAspect` itself needs to be configured by Spring (in order to obtain
181180
a reference to the bean factory that is to be used to configure new objects). If you
@@ -399,7 +398,7 @@ The focus of this section is on configuring and using LTW in the specific contex
399398
Spring Framework. This section is not a general introduction to LTW. For full details on
400399
the specifics of LTW and configuring LTW with only AspectJ (with Spring not being
401400
involved at all), see the
402-
https://www.eclipse.org/aspectj/doc/released/devguide/ltw.html[LTW section of the AspectJ
401+
{aspectj-docs-devguide}/ltw.html[LTW section of the AspectJ
403402
Development Environment Guide].
404403

405404
The value that the Spring Framework brings to AspectJ LTW is in enabling much
@@ -421,7 +420,7 @@ who typically are in charge of the deployment configuration, such as the launch
421420
Now that the sales pitch is over, let us first walk through a quick example of AspectJ
422421
LTW that uses Spring, followed by detailed specifics about elements introduced in the
423422
example. For a complete example, see the
424-
https://github.com/spring-projects/spring-petclinic[Petclinic sample application].
423+
{spring-github-org}/spring-petclinic[Petclinic sample application].
425424

426425

427426
[[aop-aj-ltw-first-example]]
@@ -621,7 +620,7 @@ java -javaagent:C:/projects/xyz/lib/spring-instrument.jar com.xyz.Main
621620
----
622621

623622
The `-javaagent` is a flag for specifying and enabling
624-
https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html[agents
623+
{java-api}/java.instrument/java/lang/instrument/package-summary.html[agents
625624
to instrument programs that run on the JVM]. The Spring Framework ships with such an
626625
agent, the `InstrumentationSavingAgent`, which is packaged in the
627626
`spring-instrument.jar` that was supplied as the value of the `-javaagent` argument in
@@ -721,7 +720,7 @@ The AspectJ LTW infrastructure is configured by using one or more `META-INF/aop.
721720
files that are on the Java classpath (either directly or, more typically, in jar files).
722721

723722
The structure and contents of this file is detailed in the LTW part of the
724-
https://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html[AspectJ reference
723+
{aspectj-docs-devguide}/ltw-configuration.html[AspectJ reference
725724
documentation]. Because the `aop.xml` file is 100% AspectJ, we do not describe it further here.
726725

727726

0 commit comments

Comments
 (0)