Skip to content

Commit c37080d

Browse files
committed
Migrate reference guide to well-formed docbook XML
Convert all docbook XML files to well-formed docbook 5 syntax: - Include xsi:schemaLocation element for tools support - Convert all id elements to xml:id - Convert all ulink elements to link - Simplify <lineannotation> mark-up - Fix misplaced </section> tags - Fix <interface> tags to <interfacename> - Cleanup trailing whitespace and tabs Issue: SPR-10032
1 parent 89b443c commit c37080d

Some content is hidden

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

50 files changed

+5848
-5466
lines changed

src/reference/docbook/aop-api.xml

Lines changed: 93 additions & 95 deletions
Large diffs are not rendered by default.

src/reference/docbook/aop.xml

Lines changed: 328 additions & 323 deletions
Large diffs are not rendered by default.

src/reference/docbook/beans-annotation-config.xml

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
3-
xmlns:xlink="http://www.w3.org/1999/xlink"
2+
<section xml:id="beans-annotation-config"
3+
xmlns="http://docbook.org/ns/docbook" version="5.0"
4+
xmlns:xl="http://www.w3.org/1999/xlink"
45
xmlns:xi="http://www.w3.org/2001/XInclude"
5-
xml:id="beans-annotation-config">
6+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7+
xsi:schemaLocation="
8+
http://docbook.org/ns/docbook http://www.docbook.org/xml/5.0/xsd/docbook.xsd
9+
http://www.w3.org/1999/xlink http://www.docbook.org/xml/5.0/xsd/xlink.xsd">
610
<title>Annotation-based container configuration</title>
711

812
<sidebar>
@@ -25,8 +29,8 @@
2529
linkend="beans-java">JavaConfig</link> option, Spring allows annotations
2630
to be used in a non-invasive way, without touching the target components
2731
source code and that in terms of tooling, all configuration styles are
28-
supported by the <ulink url="http://www.springsource.com/products/sts"
29-
>SpringSource Tool Suite</ulink>.</para>
32+
supported by the <link xl:href="http://www.springsource.com/products/sts"
33+
>SpringSource Tool Suite</link>.</para>
3034
</sidebar>
3135

3236
<para>An alternative to XML setups is provided by annotation-based
@@ -51,10 +55,10 @@
5155
JSR-330 (Dependency Injection for Java) annotations contained in the
5256
javax.inject package such as <classname>@Inject</classname> and
5357
<literal> @Named</literal>. Details about those annotations can be found in the <link linkend="beans-standard-annotations"
54-
>relevant section</link>. <note> Annotation injection is performed
58+
>relevant section</link>. <note><para>Annotation injection is performed
5559
<emphasis>before</emphasis> XML injection, thus the latter configuration
5660
will override the former for properties wired through both approaches.
57-
</note> As always, you can register them as individual bean definitions, but
61+
</para></note> As always, you can register them as individual bean definitions, but
5862
they can also be implicitly registered by including the following tag in an
5963
XML-based Spring configuration (notice the inclusion of the
6064
<literal>context</literal> namespace):</para>
@@ -72,16 +76,16 @@
7276

7377
&lt;/beans&gt;</programlisting>
7478

75-
<para>(The implicitly registered post-processors include <ulink
76-
url="http://static.springframework.org/spring/docs/current/api/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.html"
77-
><classname>AutowiredAnnotationBeanPostProcessor</classname></ulink>, <ulink
78-
url="http://static.springframework.org/spring/docs/current/api/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.html"
79-
><classname>CommonAnnotationBeanPostProcessor</classname></ulink>, <ulink
80-
url="http://static.springframework.org/spring/docs/current/api/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.html"
81-
><classname>PersistenceAnnotationBeanPostProcessor</classname></ulink>, as
82-
well as the aforementioned <ulink
83-
url="http://static.springframework.org/spring/docs/current/api/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.html"
84-
><classname>RequiredAnnotationBeanPostProcessor</classname></ulink>.)</para>
79+
<para>(The implicitly registered post-processors include <link
80+
xl:href="http://static.springframework.org/spring/docs/current/api/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.html"
81+
><classname>AutowiredAnnotationBeanPostProcessor</classname></link>, <link
82+
xl:href="http://static.springframework.org/spring/docs/current/api/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.html"
83+
><classname>CommonAnnotationBeanPostProcessor</classname></link>, <link
84+
xl:href="http://static.springframework.org/spring/docs/current/api/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.html"
85+
><classname>PersistenceAnnotationBeanPostProcessor</classname></link>, as
86+
well as the aforementioned <link
87+
xl:href="http://static.springframework.org/spring/docs/current/api/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.html"
88+
><classname>RequiredAnnotationBeanPostProcessor</classname></link>.)</para>
8589

8690
<note>
8791
<para><literal>&lt;context:annotation-config/&gt;</literal> only looks for
@@ -95,7 +99,7 @@
9599
information.</para>
96100
</note>
97101

98-
<section id="beans-required-annotation">
102+
<section xml:id="beans-required-annotation">
99103
<title><interfacename>@Required</interfacename></title>
100104

101105
<para>The <interfacename>@Required</interfacename> annotation applies to
@@ -124,14 +128,14 @@
124128
and values even when you use the class outside of a container.</para>
125129
</section>
126130

127-
<section id="beans-autowired-annotation">
131+
<section xml:id="beans-autowired-annotation">
128132
<title><interfacename>@Autowired</interfacename></title>
129133

130134
<para>As expected, you can apply the
131135
<interfacename>@Autowired</interfacename> annotation to "traditional"
132136
setter methods:</para>
133137

134-
138+
135139

136140
<programlisting language="java">public class SimpleMovieLister {
137141

@@ -145,13 +149,13 @@
145149
<lineannotation>// ...</lineannotation>
146150
}</programlisting>
147151

148-
<note>
152+
<note>
149153
<para>JSR 330's @Inject annotation can be used in place of Spring's
150154
<interfacename>@Autowired</interfacename> annotation in the examples below. See <link linkend="beans-standard-annotations"
151155
>here</link> for more details</para>
152156
</note>
153-
154-
157+
158+
155159
<para>You can also apply the annotation to methods with arbitrary names
156160
and/or multiple arguments:</para>
157161

@@ -310,7 +314,7 @@
310314
</note>
311315
</section>
312316

313-
<section id="beans-autowired-annotation-qualifiers">
317+
<section xml:id="beans-autowired-annotation-qualifiers">
314318
<title>Fine-tuning annotation-based autowiring with qualifiers</title>
315319

316320
<para>Because autowiring by type may lead to multiple candidates, it is
@@ -635,12 +639,12 @@ public @interface MovieQualifier {
635639
&lt;/beans&gt;</programlisting>
636640
</section>
637641

638-
<section id="beans-custom-autowire-configurer">
642+
<section xml:id="beans-custom-autowire-configurer">
639643
<title><classname>CustomAutowireConfigurer</classname></title>
640644

641-
<para>The <ulink
642-
url="http://static.springframework.org/spring/docs/current/api/org/springframework/beans/factory/annotation/CustomAutowireConfigurer.html"
643-
><classname>CustomAutowireConfigurer</classname></ulink> is a
645+
<para>The <link
646+
xl:href="http://static.springframework.org/spring/docs/current/api/org/springframework/beans/factory/annotation/CustomAutowireConfigurer.html"
647+
><classname>CustomAutowireConfigurer</classname></link> is a
644648
<interfacename>BeanFactoryPostProcessor</interfacename> that enables you
645649
to register your own custom qualifier annotation types even if they are
646650
not annotated with Spring's <interfacename>@Qualifier</interfacename>
@@ -675,7 +679,7 @@ public @interface MovieQualifier {
675679
will be selected.</para>
676680
</section>
677681

678-
<section id="beans-resource-annotation">
682+
<section xml:id="beans-resource-annotation">
679683
<title><interfacename>@Resource</interfacename></title>
680684

681685
<para>Spring also supports injection using the JSR-250
@@ -719,9 +723,9 @@ public @interface MovieQualifier {
719723
<para>The name provided with the annotation is resolved as a bean name by
720724
the <interfacename>ApplicationContext</interfacename> of which the
721725
<classname>CommonAnnotationBeanPostProcessor</classname> is aware. The
722-
names can be resolved through JNDI if you configure Spring's <ulink
723-
url="http://static.springframework.org/spring/docs/current/api/org/springframework/jndi/support/SimpleJndiBeanFactory.html"
724-
><classname>SimpleJndiBeanFactory</classname></ulink> explicitly.
726+
names can be resolved through JNDI if you configure Spring's <link
727+
xl:href="http://static.springframework.org/spring/docs/current/api/org/springframework/jndi/support/SimpleJndiBeanFactory.html"
728+
><classname>SimpleJndiBeanFactory</classname></link> explicitly.
725729
However, it is recommended that you rely on the default behavior and
726730
simply use Spring's JNDI lookup capabilities to preserve the level of
727731
indirection.</para>
@@ -760,7 +764,7 @@ public @interface MovieQualifier {
760764
}</programlisting>
761765
</section>
762766

763-
<section id="beans-postconstruct-and-predestroy-annotations">
767+
<section xml:id="beans-postconstruct-and-predestroy-annotations">
764768
<title><interfacename>@PostConstruct</interfacename> and
765769
<interfacename>@PreDestroy</interfacename></title>
766770

src/reference/docbook/beans-classpath-scanning.xml

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
3-
xmlns:xlink="http://www.w3.org/1999/xlink"
2+
<section xml:id="beans-classpath-scanning"
3+
xmlns="http://docbook.org/ns/docbook" version="5.0"
4+
xmlns:xl="http://www.w3.org/1999/xlink"
45
xmlns:xi="http://www.w3.org/2001/XInclude"
5-
xml:id="beans-classpath-scanning">
6+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7+
xsi:schemaLocation="
8+
http://docbook.org/ns/docbook http://www.docbook.org/xml/5.0/xsd/docbook.xsd
9+
http://www.w3.org/1999/xlink http://www.docbook.org/xml/5.0/xsd/xlink.xsd">
610
<title>Classpath scanning and managed components</title>
711

812
<para>Most examples in this chapter use XML to specify the configuration
@@ -22,9 +26,9 @@
2226
definitions registered with the container.</para>
2327

2428
<note>
25-
<para>Starting with Spring 3.0, many features provided by the <ulink
26-
url="http://www.springsource.org/javaconfig">Spring JavaConfig
27-
project</ulink> are part of the core Spring Framework. This allows you to
29+
<para>Starting with Spring 3.0, many features provided by the <link
30+
xl:href="http://www.springsource.org/javaconfig">Spring JavaConfig
31+
project</link> are part of the core Spring Framework. This allows you to
2832
define beans using Java rather than using the traditional XML files. Take
2933
a look at the <interfacename>@Configuration</interfacename>,
3034
<interfacename>@Bean</interfacename>,
@@ -33,7 +37,7 @@
3337
to use these new features.</para>
3438
</note>
3539

36-
<section id="beans-stereotype-annotations">
40+
<section xml:id="beans-stereotype-annotations">
3741
<title><interfacename>@Component</interfacename> and further stereotype
3842
annotations</title>
3943

@@ -73,7 +77,7 @@
7377
persistence layer.</para>
7478
</section>
7579

76-
<section id="beans-scanning-autodetection">
80+
<section xml:id="beans-scanning-autodetection">
7781
<title>Automatically detecting classes and registering bean
7882
definitions</title>
7983

@@ -155,7 +159,7 @@ public class JpaMovieFinder implements MovieFinder {
155159
-->
156160
</section>
157161

158-
<section id="beans-scanning-filters">
162+
<section xml:id="beans-scanning-filters">
159163
<title>Using filters to customize scanning</title>
160164

161165
<para>By default, classes annotated with
@@ -172,7 +176,7 @@ public class JpaMovieFinder implements MovieFinder {
172176
<literal>expression</literal> attributes. The following table describes
173177
the filtering options.</para>
174178

175-
<table id="beans-scanning-filters-tbl">
179+
<table xml:id="beans-scanning-filters-tbl">
176180
<title>Filter Types</title>
177181

178182
<tgroup cols="3">
@@ -268,7 +272,7 @@ public class JpaMovieFinder implements MovieFinder {
268272
</note>
269273
</section>
270274

271-
<section id="beans-factorybeans-annotations">
275+
<section xml:id="beans-factorybeans-annotations">
272276
<title>Defining bean metadata within components</title>
273277

274278
<para>Spring components can also contribute bean definition metadata to the
@@ -358,7 +362,7 @@ public class FactoryMethodComponent {
358362
semantics.</para>
359363
</section>
360364

361-
<section id="beans-scanning-name-generator">
365+
<section xml:id="beans-scanning-name-generator">
362366
<title>Naming autodetected components</title>
363367

364368
<para>When a component is autodetected as part of the scanning process, its
@@ -390,9 +394,9 @@ public class MovieFinderImpl implements MovieFinder {
390394

391395
<note>
392396
<para>If you do not want to rely on the default bean-naming strategy, you
393-
can provide a custom bean-naming strategy. First, implement the <ulink
394-
url="http://static.springframework.org/spring/docs/current/api/org/springframework/beans/factory/support/BeanNameGenerator.html"
395-
><interfacename>BeanNameGenerator</interfacename></ulink> interface, and
397+
can provide a custom bean-naming strategy. First, implement the <link
398+
xl:href="http://static.springframework.org/spring/docs/current/api/org/springframework/beans/factory/support/BeanNameGenerator.html"
399+
><interfacename>BeanNameGenerator</interfacename></link> interface, and
396400
be sure to include a default no-arg constructor. Then, provide the
397401
fully-qualified class name when configuring the scanner:</para>
398402
</note>
@@ -410,7 +414,7 @@ public class MovieFinderImpl implements MovieFinder {
410414
is responsible for wiring.</para>
411415
</section>
412416

413-
<section id="beans-scanning-scope-resolver">
417+
<section xml:id="beans-scanning-scope-resolver">
414418
<title>Providing a scope for autodetected components</title>
415419

416420
<para>As with Spring-managed components in general, the default and most
@@ -427,9 +431,9 @@ public class MovieFinderImpl implements MovieFinder {
427431

428432
<note>
429433
<para>To provide a custom strategy for scope resolution rather than
430-
relying on the annotation-based approach, implement the <ulink
431-
url="http://static.springframework.org/spring/docs/current/api/org/springframework/context/annotation/ScopeMetadataResolver.html"
432-
><interfacename>ScopeMetadataResolver</interfacename></ulink> interface,
434+
relying on the annotation-based approach, implement the <link
435+
xl:href="http://static.springframework.org/spring/docs/current/api/org/springframework/context/annotation/ScopeMetadataResolver.html"
436+
><interfacename>ScopeMetadataResolver</interfacename></link> interface,
433437
and be sure to include a default no-arg constructor. Then, provide the
434438
fully-qualified class name when configuring the scanner:</para>
435439
</note>
@@ -457,7 +461,7 @@ public class MovieFinderImpl implements MovieFinder {
457461
&lt;/beans&gt;</programlisting>
458462
</section>
459463

460-
<section id="beans-scanning-qualifiers">
464+
<section xml:id="beans-scanning-qualifiers">
461465
<title>Providing qualifier metadata with annotations</title>
462466

463467
<para>The <interfacename>@Qualifier</interfacename> annotation is discussed

0 commit comments

Comments
 (0)