Skip to content

Commit 4b22a4a

Browse files
committed
Merge PDF reference documentation into single file
This commit configures the documentation build to merge the entire reference documentation into a single PDF file. To achieve that, this commit also fixes duplicate anchors that were introduced while factoring out common parts of the documentation for MVC and WebFlux. Closes gh-28451
1 parent af8518a commit 4b22a4a

17 files changed

+106
-78
lines changed

framework-docs/framework-docs.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ asciidoctorPdf {
130130
baseDirFollowsSourceDir()
131131
configurations 'asciidoctorExtensions'
132132
sources {
133-
include '*.adoc'
133+
include 'spring-framework.adocbook'
134134
}
135135
outputDir "$buildDir/docs/ref-docs/pdf"
136136
forkOptions {

framework-docs/src/docs/asciidoc/core/core-aop.adoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ element, as the following example shows:
262262
----
263263

264264
This assumes that you use schema support as described in
265-
<<core.adoc#xsd-schemas, XML Schema-based configuration>>.
266-
See <<core.adoc#xsd-schemas-aop, the AOP schema>> for how to
265+
<<core.adoc#core.appendix.xsd-schemas, XML Schema-based configuration>>.
266+
See <<core.adoc#core.appendix.xsd-schemas-aop, the AOP schema>> for how to
267267
import the tags in the `aop` namespace.
268268

269269

@@ -1991,8 +1991,8 @@ that syntax and refer the reader to the discussion in the previous section
19911991
of advice parameters.
19921992

19931993
To use the aop namespace tags described in this section, you need to import the
1994-
`spring-aop` schema, as described in <<core.adoc#xsd-schemas,
1995-
XML Schema-based configuration>>. See <<core.adoc#xsd-schemas-aop, the AOP schema>>
1994+
`spring-aop` schema, as described in <<core.adoc#core.appendix.xsd-schemas,
1995+
XML Schema-based configuration>>. See <<core.adoc#core.appendix.xsd-schemas-aop, the AOP schema>>
19961996
for how to import the tags in the `aop` namespace.
19971997

19981998
Within your Spring configurations, all aspect and advisor elements must be placed within
@@ -3502,7 +3502,7 @@ use Java-based configuration, you can add `@EnableSpringConfigured` to any
35023502
----
35033503

35043504
If you prefer XML based configuration, the Spring
3505-
<<core.adoc#xsd-schemas-context, `context` namespace>>
3505+
<<core.adoc#core.appendix.xsd-schemas-context, `context` namespace>>
35063506
defines a convenient `context:spring-configured` element, which you can use as follows:
35073507

35083508
[source,xml,indent=0,subs="verbatim,quotes"]

framework-docs/src/docs/asciidoc/core/core-appendix.adoc

+41-40
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
[[core.appendix]]
12
= Appendix
23

34

45

56

6-
[[xsd-schemas]]
7+
[[core.appendix.xsd-schemas]]
78
== XML Schemas
89

910
This part of the appendix lists XML schemas related to the core container.
1011

1112

1213

13-
[[xsd-schemas-util]]
14+
[[core.appendix.xsd-schemas-util]]
1415
=== The `util` Schema
1516

1617
As the name implies, the `util` tags deal with common, utility configuration
@@ -35,7 +36,7 @@ correct schema so that the tags in the `util` namespace are available to you):
3536
----
3637

3738

38-
[[xsd-schemas-util-constant]]
39+
[[core.appendix.xsd-schemas-util-constant]]
3940
==== Using `<util:constant/>`
4041

4142
Consider the following bean definition:
@@ -68,7 +69,7 @@ developer's intent ("`inject this constant value`"), and it reads better:
6869
</bean>
6970
----
7071

71-
[[xsd-schemas-util-frfb]]
72+
[[core.appendix.xsd-schemas-util-frfb]]
7273
===== Setting a Bean Property or Constructor Argument from a Field Value
7374

7475
{api-spring-framework}/beans/factory/config/FieldRetrievingFactoryBean.html[`FieldRetrievingFactoryBean`]
@@ -180,7 +181,7 @@ Now consider the following setter of type `PersistenceContextType` and the corre
180181
----
181182

182183

183-
[[xsd-schemas-util-property-path]]
184+
[[core.appendix.xsd-schemas-util-property-path]]
184185
==== Using `<util:property-path/>`
185186

186187
Consider the following example:
@@ -227,7 +228,7 @@ The value of the `path` attribute of the `<property-path/>` element follows the
227228
`beanName.beanProperty`. In this case, it picks up the `age` property of the bean named
228229
`testBean`. The value of that `age` property is `10`.
229230

230-
[[xsd-schemas-util-property-path-dependency]]
231+
[[core.appendix.xsd-schemas-util-property-path-dependency]]
231232
===== Using `<util:property-path/>` to Set a Bean Property or Constructor Argument
232233

233234
`PropertyPathFactoryBean` is a `FactoryBean` that evaluates a property path on a given
@@ -302,7 +303,7 @@ for most use cases, but it can sometimes be useful. See the javadoc for more inf
302303
this feature.
303304

304305

305-
[[xsd-schemas-util-properties]]
306+
[[core.appendix.xsd-schemas-util-properties]]
306307
==== Using `<util:properties/>`
307308

308309
Consider the following example:
@@ -328,7 +329,7 @@ The following example uses a `util:properties` element to make a more concise re
328329
----
329330

330331

331-
[[xsd-schemas-util-list]]
332+
[[core.appendix.xsd-schemas-util-list]]
332333
==== Using `<util:list/>`
333334

334335
Consider the following example:
@@ -383,7 +384,7 @@ following configuration:
383384
If no `list-class` attribute is supplied, the container chooses a `List` implementation.
384385

385386

386-
[[xsd-schemas-util-map]]
387+
[[core.appendix.xsd-schemas-util-map]]
387388
==== Using `<util:map/>`
388389

389390
Consider the following example:
@@ -438,7 +439,7 @@ following configuration:
438439
If no `'map-class'` attribute is supplied, the container chooses a `Map` implementation.
439440

440441

441-
[[xsd-schemas-util-set]]
442+
[[core.appendix.xsd-schemas-util-set]]
442443
==== Using `<util:set/>`
443444

444445
Consider the following example:
@@ -494,7 +495,7 @@ If no `set-class` attribute is supplied, the container chooses a `Set` implement
494495

495496

496497

497-
[[xsd-schemas-aop]]
498+
[[core.appendix.xsd-schemas-aop]]
498499
=== The `aop` Schema
499500

500501
The `aop` tags deal with configuring all things AOP in Spring, including Spring's
@@ -524,7 +525,7 @@ are available to you):
524525

525526

526527

527-
[[xsd-schemas-context]]
528+
[[core.appendix.xsd-schemas-context]]
528529
=== The `context` Schema
529530

530531
The `context` tags deal with `ApplicationContext` configuration that relates to plumbing
@@ -549,7 +550,7 @@ available to you:
549550
----
550551

551552

552-
[[xsd-schemas-context-pphc]]
553+
[[core.appendix.xsd-schemas-context-pphc]]
553554
==== Using `<property-placeholder/>`
554555

555556
This element activates the replacement of `${...}` placeholders, which are resolved against a
@@ -559,7 +560,7 @@ is a convenience mechanism that sets up a <<core.adoc#beans-factory-placeholderc
559560
`PropertySourcesPlaceholderConfigurer` setup, you can explicitly define it as a bean yourself.
560561

561562

562-
[[xsd-schemas-context-ac]]
563+
[[core.appendix.xsd-schemas-context-ac]]
563564
==== Using `<annotation-config/>`
564565

565566
This element activates the Spring infrastructure to detect annotations in bean classes:
@@ -582,36 +583,36 @@ element for that purpose. Similarly, Spring's
582583
<<integration.adoc#cache-annotation-enable, enabled>> as well.
583584

584585

585-
[[xsd-schemas-context-component-scan]]
586+
[[core.appendix.xsd-schemas-context-component-scan]]
586587
==== Using `<component-scan/>`
587588

588589
This element is detailed in the section on <<core.adoc#beans-annotation-config,
589590
annotation-based container configuration>>.
590591

591592

592-
[[xsd-schemas-context-ltw]]
593+
[[core.appendix.xsd-schemas-context-ltw]]
593594
==== Using `<load-time-weaver/>`
594595

595596
This element is detailed in the section on <<core.adoc#aop-aj-ltw,
596597
load-time weaving with AspectJ in the Spring Framework>>.
597598

598599

599-
[[xsd-schemas-context-sc]]
600+
[[core.appendix.xsd-schemas-context-sc]]
600601
==== Using `<spring-configured/>`
601602

602603
This element is detailed in the section on <<core.adoc#aop-atconfigurable,
603604
using AspectJ to dependency inject domain objects with Spring>>.
604605

605606

606-
[[xsd-schemas-context-mbe]]
607+
[[core.appendix.xsd-schemas-context-mbe]]
607608
==== Using `<mbean-export/>`
608609

609610
This element is detailed in the section on <<integration.adoc#jmx-context-mbeanexport,
610611
configuring annotation-based MBean export>>.
611612

612613

613614

614-
[[xsd-schemas-beans]]
615+
[[core.appendix.xsd-schemas-beans]]
615616
=== The Beans Schema
616617

617618
Last but not least, we have the elements in the `beans` schema. These elements
@@ -623,7 +624,7 @@ in <<core.adoc#beans-factory-properties-detailed, dependencies and configuration
623624
Note that you can add zero or more key-value pairs to `<bean/>` XML definitions.
624625
What, if anything, is done with this extra metadata is totally up to your own custom
625626
logic (and so is typically only of use if you write your own custom elements as described
626-
in the appendix entitled <<xml-custom>>).
627+
in the appendix entitled <<core.appendix.xml-custom>>).
627628

628629
The following example shows the `<meta/>` element in the context of a surrounding `<bean/>`
629630
(note that, without any logic to interpret it, the metadata is effectively useless
@@ -652,10 +653,10 @@ the bean definition and sets up some caching infrastructure that uses the suppli
652653

653654

654655

655-
[[xml-custom]]
656+
[[core.appendix.xml-custom]]
656657
== XML Schema Authoring
657658

658-
[[xsd-custom-introduction]]
659+
[[core.appendix.xsd-custom-introduction]]
659660
Since version 2.0, Spring has featured a mechanism for adding schema-based extensions to the
660661
basic Spring XML format for defining and configuring beans. This section covers
661662
how to write your own custom XML bean definition parsers and
@@ -664,16 +665,16 @@ integrate such parsers into the Spring IoC container.
664665
To facilitate authoring configuration files that use a schema-aware XML editor,
665666
Spring's extensible XML configuration mechanism is based on XML Schema. If you are not
666667
familiar with Spring's current XML configuration extensions that come with the standard
667-
Spring distribution, you should first read the previous section on <<xsd-schemas>>.
668+
Spring distribution, you should first read the previous section on <<core.appendix.xsd-schemas>>.
668669

669670

670671
To create new XML configuration extensions:
671672

672-
. <<xsd-custom-schema, Author>> an XML schema to describe your custom element(s).
673-
. <<xsd-custom-namespacehandler, Code>> a custom `NamespaceHandler` implementation.
674-
. <<xsd-custom-parser, Code>> one or more `BeanDefinitionParser` implementations
673+
. <<core.appendix.xsd-custom-schema, Author>> an XML schema to describe your custom element(s).
674+
. <<core.appendix.xsd-custom-namespacehandler, Code>> a custom `NamespaceHandler` implementation.
675+
. <<core.appendix.xsd-custom-parser, Code>> one or more `BeanDefinitionParser` implementations
675676
(this is where the real work is done).
676-
. <<xsd-custom-registration, Register>> your new artifacts with Spring.
677+
. <<core.appendix.xsd-custom-registration, Register>> your new artifacts with Spring.
677678

678679
For a unified example, we create an
679680
XML extension (a custom XML element) that lets us configure objects of the type
@@ -693,7 +694,7 @@ through the basic steps of making a custom extension.)
693694

694695

695696

696-
[[xsd-custom-schema]]
697+
[[core.appendix.xsd-custom-schema]]
697698
=== Authoring the Schema
698699

699700
Creating an XML configuration extension for use with Spring's IoC container starts with
@@ -765,7 +766,7 @@ defined in the enumeration.
765766

766767

767768

768-
[[xsd-custom-namespacehandler]]
769+
[[core.appendix.xsd-custom-namespacehandler]]
769770
=== Coding a `NamespaceHandler`
770771

771772
In addition to the schema, we need a `NamespaceHandler` to parse all elements of
@@ -836,7 +837,7 @@ custom element, as we can see in the next step.
836837

837838

838839

839-
[[xsd-custom-parser]]
840+
[[core.appendix.xsd-custom-parser]]
840841
=== Using `BeanDefinitionParser`
841842

842843
A `BeanDefinitionParser` is used if the `NamespaceHandler` encounters an XML
@@ -926,7 +927,7 @@ is the extraction and setting of the bean definition's unique identifier.
926927

927928

928929

929-
[[xsd-custom-registration]]
930+
[[core.appendix.xsd-custom-registration]]
930931
=== Registering the Handler and the Schema
931932

932933
The coding is finished. All that remains to be done is to make the Spring XML
@@ -938,7 +939,7 @@ XML parsing infrastructure automatically picks up your new extension by consumin
938939
these special properties files, the formats of which are detailed in the next two sections.
939940

940941

941-
[[xsd-custom-registration-spring-handlers]]
942+
[[core.appendix.xsd-custom-registration-spring-handlers]]
942943
==== Writing `META-INF/spring.handlers`
943944

944945
The properties file called `spring.handlers` contains a mapping of XML Schema URIs to
@@ -957,7 +958,7 @@ namespace extension and needs to exactly match exactly the value of the `targetN
957958
attribute, as specified in your custom XSD schema.
958959

959960

960-
[[xsd-custom-registration-spring-schemas]]
961+
[[core.appendix.xsd-custom-registration-spring-schemas]]
961962
==== Writing 'META-INF/spring.schemas'
962963

963964
The properties file called `spring.schemas` contains a mapping of XML Schema locations
@@ -981,7 +982,7 @@ the `NamespaceHandler` and `BeanDefinitionParser` classes on the classpath.
981982

982983

983984

984-
[[xsd-custom-using]]
985+
[[core.appendix.xsd-custom-using]]
985986
=== Using a Custom Extension in Your Spring XML Configuration
986987

987988
Using a custom extension that you yourself have implemented is no different from using
@@ -1015,13 +1016,13 @@ in a Spring XML configuration file:
10151016

10161017

10171018

1018-
[[xsd-custom-meat]]
1019+
[[core.appendix.xsd-custom-meat]]
10191020
=== More Detailed Examples
10201021

10211022
This section presents some more detailed examples of custom XML extensions.
10221023

10231024

1024-
[[xsd-custom-custom-nested]]
1025+
[[core.appendix.xsd-custom-custom-nested]]
10251026
==== Nesting Custom Elements within Custom Elements
10261027

10271028
The example presented in this section shows how you to write the various artifacts required
@@ -1195,7 +1196,7 @@ setter property for the `components` property. The following listing shows such
11951196

11961197
This works nicely, but it exposes a lot of Spring plumbing to the end user. What we are
11971198
going to do is write a custom extension that hides away all of this Spring plumbing.
1198-
If we stick to <<xsd-custom-introduction, the steps described previously>>, we start off
1199+
If we stick to <<core.appendix.xsd-custom-introduction, the steps described previously>>, we start off
11991200
by creating the XSD schema to define the structure of our custom tag, as the following
12001201
listing shows:
12011202

@@ -1222,7 +1223,7 @@ listing shows:
12221223
</xsd:schema>
12231224
----
12241225

1225-
Again following <<xsd-custom-introduction, the process described earlier>>,
1226+
Again following <<core.appendix.xsd-custom-introduction, the process described earlier>>,
12261227
we then create a custom `NamespaceHandler`:
12271228

12281229
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
@@ -1373,7 +1374,7 @@ http\://www.foo.example/schema/component/component.xsd=com/foo/component.xsd
13731374
----
13741375

13751376

1376-
[[xsd-custom-custom-just-attributes]]
1377+
[[core.appendix.xsd-custom-custom-just-attributes]]
13771378
==== Custom Attributes on "`Normal`" Elements
13781379

13791380
Writing your own custom parser and the associated artifacts is not hard. However,
@@ -1610,7 +1611,7 @@ http\://www.foo.example/schema/jcache/jcache.xsd=com/foo/jcache.xsd
16101611
----
16111612

16121613

1613-
[[application-startup-steps]]
1614+
[[core.appendix.application-startup-steps]]
16141615
== Application Startup Steps
16151616

16161617
This part of the appendix lists the existing `StartupSteps` that the core container is instrumented with.

framework-docs/src/docs/asciidoc/core/core-beans.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1900,7 +1900,7 @@ The preceding configuration is equivalent to the following Java code:
19001900
The p-namespace lets you use the `bean` element's attributes (instead of nested
19011901
`<property/>` elements) to describe your property values collaborating beans, or both.
19021902

1903-
Spring supports extensible configuration formats <<core.adoc#xsd-schemas,with namespaces>>,
1903+
Spring supports extensible configuration formats <<core.adoc#core.appendix.xsd-schemas,with namespaces>>,
19041904
which are based on an XML Schema definition. The `beans` configuration format discussed in
19051905
this chapter is defined in an XML Schema document. However, the p-namespace is not defined
19061906
in an XSD file and exists only in the core of Spring.
@@ -3094,7 +3094,7 @@ understand the "`why`" as well as the "`how`" behind it:
30943094

30953095
To create such a proxy, you insert a child `<aop:scoped-proxy/>` element into a scoped
30963096
bean definition (see <<beans-factory-scopes-other-injection-proxies>> and
3097-
<<core.adoc#xsd-schemas, XML Schema-based configuration>>).
3097+
<<core.adoc#core.appendix.xsd-schemas, XML Schema-based configuration>>).
30983098
Why do definitions of beans scoped at the `request`, `session` and custom-scope
30993099
levels require the `<aop:scoped-proxy/>` element?
31003100
Consider the following singleton bean definition and contrast it with
@@ -10995,7 +10995,7 @@ Here is an example of instrumentation in the `AnnotationConfigApplicationContext
1099510995
The application context is already instrumented with multiple steps.
1099610996
Once recorded, these startup steps can be collected, displayed and analyzed with specific tools.
1099710997
For a complete list of existing startup steps, you can check out the
10998-
<<application-startup-steps, dedicated appendix section>>.
10998+
<<core.appendix.application-startup-steps, dedicated appendix section>>.
1099910999

1100011000
The default `ApplicationStartup` implementation is a no-op variant, for minimal overhead.
1100111001
This means no metrics will be collected during application startup by default.

0 commit comments

Comments
 (0)