Browse Source

updates made during my review of beans.xml:

* eliminated all usage of "the section entitled", because <xref> links already render including "the section called ".  This was resulting in sentences like 'see also the section entitled the section called "@Autowired"'. This issue affected nearly all sections of the documentation, so went beyond just beans.xml

* fixed table overflow in the "Using filters to customize scanning" section (approx. p.90)

* fixed all code overflows in <programlisting/> elements

* corrected a couple minor syntax errors with SpEL examples (missing closing braces)

* added 'language="..."' element to <programlisting> elements where appropriate to enable syntax highlighting.

* normalized all code indention to four-space (some code listings were using one- and two-space)

* updated all code listings to use same-line opening braces.

* eliminated section regarding backward compatibility with Spring DTDs and singleton=true|false.  This seems like cruft to me, and we shouldn't keep historical notes around forever.

* Added <note> regarding the new thread scope (SimpleThreadScope) to Section 3.5 Bean Scopes.  Also updated the section on registering a custom Scope implementation to use the SimpleThreadScope as an example.

* updated the new-in-3.xml section to improve the @Configuration example
pull/23217/head
Chris Beams 17 years ago
parent
commit
19bccaaa11
  1. 10
      spring-framework-reference/src/aop-api.xml
  2. 6
      spring-framework-reference/src/aop.xml
  3. 247
      spring-framework-reference/src/beans.xml
  4. 6
      spring-framework-reference/src/cci.xml
  5. 8
      spring-framework-reference/src/classic-aop-spring.xml
  6. 31
      spring-framework-reference/src/dynamic-languages.xml
  7. 6
      spring-framework-reference/src/expressions.xml
  8. 11
      spring-framework-reference/src/jdbc.xml
  9. 12
      spring-framework-reference/src/jms.xml
  10. 14
      spring-framework-reference/src/jmx.xml
  11. 31
      spring-framework-reference/src/new-in-2.xml
  12. 15
      spring-framework-reference/src/new-in-3.xml
  13. 8
      spring-framework-reference/src/portlet.xml
  14. 14
      spring-framework-reference/src/resources.xml
  15. 3
      spring-framework-reference/src/view.xml
  16. 4
      spring-framework-reference/src/web-integration.xml
  17. 16
      spring-framework-reference/src/xsd-configuration.xml

10
spring-framework-reference/src/aop-api.xml

@ -859,8 +859,8 @@ public interface IntroductionInfo {
</listitem> </listitem>
<listitem> <listitem>
<para>Specify whether to use CGLIB (see below and also the section <para>Specify whether to use CGLIB (see below and also
entitled <xref linkend="aop-pfb-proxy-types" />).</para> <xref linkend="aop-pfb-proxy-types" />).</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
@ -875,8 +875,7 @@ public interface IntroductionInfo {
if the target class is to be proxied, rather than the target class' if the target class is to be proxied, rather than the target class'
interfaces. If this property value is set to interfaces. If this property value is set to
<literal>true</literal>, then CGLIB proxies will be created (but see <literal>true</literal>, then CGLIB proxies will be created (but see
also below the section entitled <xref also <xref linkend="aop-pfb-proxy-types" />).</para>
linkend="aop-pfb-proxy-types" />).</para>
</listitem> </listitem>
<listitem> <listitem>
@ -927,8 +926,7 @@ public interface IntroductionInfo {
<listitem> <listitem>
<para><literal>proxyInterfaces</literal>: array of String interface <para><literal>proxyInterfaces</literal>: array of String interface
names. If this isn't supplied, a CGLIB proxy for the target class names. If this isn't supplied, a CGLIB proxy for the target class
will be used (but see also below the section entitled <xref will be used (but see also <xref linkend="aop-pfb-proxy-types" />).</para>
linkend="aop-pfb-proxy-types" />).</para>
</listitem> </listitem>
<listitem> <listitem>

6
spring-framework-reference/src/aop.xml

@ -271,8 +271,8 @@
indication that the Spring team favors the @AspectJ annotation-style indication that the Spring team favors the @AspectJ annotation-style
approach over the Spring XML configuration-style.</para> approach over the Spring XML configuration-style.</para>
<para>See the section entitled <xref linkend="aop-choosing" /> for a <para>See <xref linkend="aop-choosing" /> for a
fuller discussion of the whys and wherefores of each style.</para> more complete discussion of the whys and wherefores of each style.</para>
</note> </note>
</section> </section>
@ -294,7 +294,7 @@
to a method as a concrete type.</para> to a method as a concrete type.</para>
<para>It is important to grasp the fact that Spring AOP is <para>It is important to grasp the fact that Spring AOP is
<emphasis>proxy-based</emphasis>. See the section entitled <xref <emphasis>proxy-based</emphasis>. See <xref
linkend="aop-understanding-aop-proxies" /> for a thorough examination of linkend="aop-understanding-aop-proxies" /> for a thorough examination of
exactly what this implementation detail actually means.</para> exactly what this implementation detail actually means.</para>
</section> </section>

247
spring-framework-reference/src/beans.xml

@ -9,8 +9,7 @@
<para>This chapter covers the Spring Framework implementation of the <para>This chapter covers the Spring Framework implementation of the
Inversion of Control (IoC) <footnote> Inversion of Control (IoC) <footnote>
<para>See the section entitled <xref <para>See <xref linkend="background-ioc" /></para>
linkend="background-ioc" /></para>
</footnote>principle. IoC is also known as <emphasis>dependency </footnote>principle. IoC is also known as <emphasis>dependency
injection</emphasis> (DI). It is a process whereby objects define their injection</emphasis> (DI). It is a process whereby objects define their
dependencies, that is, the other objects they work with, only through dependencies, that is, the other objects they work with, only through
@ -216,8 +215,8 @@ The footnote should x-ref to first section in that chapter but I can't find the
metadata from a variety of external resources such as the local file metadata from a variety of external resources such as the local file
system, from the Java <literal>CLASSPATH</literal>, and so on.</para> system, from the Java <literal>CLASSPATH</literal>, and so on.</para>
<programlisting language="java">ApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"services.xml", <programlisting language="java">ApplicationContext context =
"daos.xml"});</programlisting> new ClassPathXmlApplicationContext(new String[] {"services.xml", "daos.xml"});</programlisting>
<note> <note>
<para>After you learn about Spring's IoC container, you may want to <para>After you learn about Spring's IoC container, you may want to
@ -233,7 +232,7 @@ The footnote should x-ref to first section in that chapter but I can't find the
<para>The following example shows the service layer objects <para>The following example shows the service layer objects
<literal>(services.xml)</literal> configuration file:</para> <literal>(services.xml)</literal> configuration file:</para>
<programlisting>&lt;?xml version="1.0" encoding="UTF-8"?&gt; <programlisting language="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;beans xmlns="http://www.springframework.org/schema/beans" &lt;beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans xsi:schemaLocation="http://www.springframework.org/schema/beans
@ -256,13 +255,14 @@ The footnote should x-ref to first section in that chapter but I can't find the
<para>The following example shows the data access objects <para>The following example shows the data access objects
<literal>daos.xml</literal>) file:</para> <literal>daos.xml</literal>) file:</para>
<programlisting>&lt;?xml version="1.0" encoding="UTF-8"?&gt; <programlisting language="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;beans xmlns="http://www.springframework.org/schema/beans" &lt;beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"&gt; http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"&gt;
&lt;bean id="accountDao" class="org.springframework.samples.jpetstore.dao.ibatis.SqlMapAccountDao"&gt; &lt;bean id="accountDao"
class="org.springframework.samples.jpetstore.dao.ibatis.SqlMapAccountDao"&gt;
&lt;!-- additional collaborators and configuration for this bean go here --&gt; &lt;!-- additional collaborators and configuration for this bean go here --&gt;
&lt;/bean&gt; &lt;/bean&gt;
@ -361,7 +361,8 @@ The footnote should x-ref to first section in that chapter but I can't find the
to read bean definitions and access them as follows:</para> to read bean definitions and access them as follows:</para>
<programlisting language="java">// create and configure beans <programlisting language="java">// create and configure beans
ApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"services.xml", "daos.xml"}); ApplicationContext context =
new ClassPathXmlApplicationContext(new String[] {"services.xml", "daos.xml"});
// retrieve configured instance // retrieve configured instance
PetStoreServiceImpl service = context.getBean("petStore", PetStoreServiceImpl.class); PetStoreServiceImpl service = context.getBean("petStore", PetStoreServiceImpl.class);
@ -1076,7 +1077,7 @@ public class ExampleBean {
properties themselves are not set until the bean <emphasis>is actually properties themselves are not set until the bean <emphasis>is actually
created</emphasis>. Beans that are singleton-scoped and set to be created</emphasis>. Beans that are singleton-scoped and set to be
pre-instantiated (the default) are created when the container is pre-instantiated (the default) are created when the container is
created. Scopes are defined in the section <xref created. Scopes are defined in <xref
linkend="beans-factory-scopes" /> Otherwise, the bean is created only linkend="beans-factory-scopes" /> Otherwise, the bean is created only
when it is requested. Creation of a bean potentially causes a graph of when it is requested. Creation of a bean potentially causes a graph of
beans to be created, as the bean's dependencies and its dependencies' beans to be created, as the bean's dependencies and its dependencies'
@ -1300,19 +1301,19 @@ public class ExampleBean {
linkend="beans-p-namespace">p-namespace</link> for even more succinct linkend="beans-p-namespace">p-namespace</link> for even more succinct
XML configuration.</para> XML configuration.</para>
<programlisting>&lt;beans xmlns="http://www.springframework.org/schema/beans" <programlisting language="xml">&lt;beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"&gt; http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"&gt;
&lt;bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" &lt;bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close"
p:driverClassName="com.mysql.jdbc.Driver" p:driverClassName="com.mysql.jdbc.Driver"
p:url="jdbc:mysql://localhost:3306/mydb" p:url="jdbc:mysql://localhost:3306/mydb"
p:username="root" p:username="root"
p:password="masterkaoli"/&gt; p:password="masterkaoli"/&gt;
&lt;/beans&gt; &lt;/beans&gt;
</programlisting> </programlisting>
@ -1329,8 +1330,9 @@ public class ExampleBean {
<para>You can also configure a <para>You can also configure a
<classname>java.util.Properties</classname> instance as:</para> <classname>java.util.Properties</classname> instance as:</para>
<programlisting language="xml">&lt;bean id="mappings" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt; <programlisting language="xml">&lt;bean id="mappings"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
<lineannotation>&lt;!-- typed as a <classname>java.util.Properties</classname> --&gt;</lineannotation> <lineannotation>&lt;!-- typed as a <classname>java.util.Properties</classname> --&gt;</lineannotation>
&lt;property name="properties"&gt; &lt;property name="properties"&gt;
&lt;value&gt; &lt;value&gt;
@ -1395,7 +1397,7 @@ public class ExampleBean {
time.</para> time.</para>
<programlisting language="xml">&lt;property name="targetName"&gt; <programlisting language="xml">&lt;property name="targetName"&gt;
<lineannotation>&lt;!-- a bean with an id of '<literal>theTargetBean</literal>' must exist; otherwise an XML exception will be thrown --&gt;</lineannotation> <lineannotation>&lt;!-- a bean with id '<literal>theTargetBean</literal>' must exist; otherwise an exception will be thrown --&gt;</lineannotation>
&lt;idref local="theTargetBean"/&gt; &lt;idref local="theTargetBean"/&gt;
&lt;/property&gt;</programlisting> &lt;/property&gt;</programlisting>
@ -1465,14 +1467,12 @@ public class ExampleBean {
&lt;/bean&gt;</programlisting> &lt;/bean&gt;</programlisting>
<programlisting language="xml"><lineannotation>&lt;!-- in the child (descendant) context --&gt;</lineannotation> <programlisting language="xml"><lineannotation>&lt;!-- in the child (descendant) context --&gt;</lineannotation>
&lt;bean id="accountService" <lineannotation>&lt;-- notice that the name of this bean is the <emphasis &lt;bean id="accountService" <lineannotation>&lt;-- bean name is the same as the parent bean --&gt;</lineannotation>
role="bold">same</emphasis> as the name of the <literal>parent</literal> bean</lineannotation>
class="org.springframework.aop.framework.ProxyFactoryBean"&gt; class="org.springframework.aop.framework.ProxyFactoryBean"&gt;
&lt;property name="target"&gt; &lt;property name="target"&gt;
&lt;ref parent="accountService"/&gt; <lineannotation>&lt;-- notice how we refer to the <emphasis &lt;ref parent="accountService"/&gt; <lineannotation>&lt;!-- notice how we refer to the parent bean --&gt;</lineannotation>
role="bold">parent</emphasis> bean</lineannotation>
&lt;/property&gt; &lt;/property&gt;
<lineannotation>&lt;!-- insert other configuration and dependencies as required as here --&gt;</lineannotation> <lineannotation>&lt;!-- insert other configuration and dependencies as required here --&gt;</lineannotation>
&lt;/bean&gt;</programlisting> &lt;/bean&gt;</programlisting>
</section> </section>
@ -2231,8 +2231,8 @@ support=support@example.co.uk</programlisting>
</table> </table>
<para>If you use Java 5 and thus have access to source-level <para>If you use Java 5 and thus have access to source-level
annotations, you may find <xref annotations, you may find <literal><xref
linkend="metadata-annotations-required" /> to be of interest.</para> linkend="metadata-annotations-required" /></literal> to be of interest.</para>
</section> </section>
<section id="beans-factory-method-injection"> <section id="beans-factory-method-injection">
@ -2278,12 +2278,13 @@ public class CommandManager implements ApplicationContextAware {
return command.execute(); return command.execute();
} }
<lineannotation>// the <interfacename>Command</interfacename> returned here could be an implementation that executes asynchronously, or whatever</lineannotation>
protected Command createCommand() { protected Command createCommand() {
return this.applicationContext.getBean("command", Command.class); <lineannotation>// notice the Spring API dependency</lineannotation> <lineannotation>// notice the Spring API dependency!</lineannotation>
return this.applicationContext.getBean("command", Command.class);
} }
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException {
this.applicationContext = applicationContext; this.applicationContext = applicationContext;
} }
}</programlisting> }</programlisting>
@ -2565,6 +2566,14 @@ public class ReplacementComputeValue implements MethodReplacer {
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
<note>
<title>Thread-scoped beans</title>
<para>As of Spring 3.0, a <emphasis>thread scope</emphasis> is available, but is
not registered by default. For more information, see the documentation for
<ulink url="http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/context/support/SimpleThreadScope.html">SimpleThreadScope</ulink>.
For instructions on how to register this or any other custom scope, see
<xref linkend="beans-factory-scopes-custom-using"/>.</para>
</note>
<section id="beans-factory-scopes-singleton"> <section id="beans-factory-scopes-singleton">
<title>The singleton scope</title> <title>The singleton scope</title>
@ -2609,11 +2618,8 @@ public class ReplacementComputeValue implements MethodReplacer {
<programlisting language="xml">&lt;bean id="accountService" class="com.foo.DefaultAccountService"/&gt; <programlisting language="xml">&lt;bean id="accountService" class="com.foo.DefaultAccountService"/&gt;
<lineannotation>&lt;!-- the following is equivalent, though redundant (singleton scope is the default); using <literal>spring-beans-2.0.dtd</literal> --&gt;</lineannotation> <lineannotation>&lt;!-- the following is equivalent, though redundant (singleton scope is the default) --&gt;</lineannotation>
&lt;bean id="accountService" class="com.foo.DefaultAccountService" scope="singleton"/&gt; &lt;bean id="accountService" class="com.foo.DefaultAccountService" scope="singleton"/&gt;</programlisting>
<lineannotation>&lt;!-- the following is equivalent and preserved for backward compatibility in <literal>spring-beans.dtd</literal> --&gt;</lineannotation>
&lt;bean id="accountService" class="com.foo.DefaultAccountService" singleton="true"/&gt;</programlisting>
</section> </section>
<section id="beans-factory-scopes-prototype"> <section id="beans-factory-scopes-prototype">
@ -2648,10 +2654,7 @@ public class ReplacementComputeValue implements MethodReplacer {
<para>The following example defines a bean as a prototype in XML:</para> <para>The following example defines a bean as a prototype in XML:</para>
<programlisting language="xml"><lineannotation>&lt;!-- using <literal>spring-beans-2.0.dtd</literal> --&gt;</lineannotation> <programlisting language="xml"><lineannotation>&lt;!-- using <literal>spring-beans-2.0.dtd</literal> --&gt;</lineannotation>
&lt;bean id="accountService" class="com.foo.DefaultAccountService" scope="prototype"/&gt; &lt;bean id="accountService" class="com.foo.DefaultAccountService" scope="prototype"/&gt;</programlisting>
<lineannotation>&lt;!-- the following is equivalent and preserved for backward compatibility in <literal>spring-beans.dtd</literal> --&gt;</lineannotation>
&lt;bean id="accountService" class="com.foo.DefaultAccountService" singleton="false"/&gt;</programlisting>
<para>In contrast to the other scopes, Spring does not manage the <para>In contrast to the other scopes, Spring does not manage the
complete lifecycle of a prototype bean: the container instantiates, complete lifecycle of a prototype bean: the container instantiates,
@ -2694,32 +2697,6 @@ public class ReplacementComputeValue implements MethodReplacer {
and injecting its dependencies. If you need a new instance of a and injecting its dependencies. If you need a new instance of a
prototype bean at runtime more than once, see <xref prototype bean at runtime more than once, see <xref
linkend="beans-factory-method-injection" /></para> linkend="beans-factory-method-injection" /></para>
<note>
<title>Backwards compatibility and specifying the lifecycle scope in
XML</title>
<para>If you reference the <filename>spring-beans.dtd</filename> DTD
in a bean definition file, and you are explicit about the lifecycle
scope of your beans, you must use the <literal>singleton</literal>
attribute to express the lifecycle scope. The <link
linkend="beans-factory-scopes-singleton">singleton lifecycle
scope</link> is the default. If you reference the
<filename>spring-beans-2.0.dtd</filename> DTD or the Spring 2.0 XSD
schema, you must use the <literal>scope</literal> attribute, because
the <literal>singleton</literal> attribute was removed from the
definition of the new DTD and XSD files in favor of the
<literal>scope</literal> attribute.</para>
<para>This means that if you use the <literal>singleton</literal>
attribute in an XML bean definition, you <emphasis>must</emphasis>
reference the <filename>spring-beans.dtd</filename> DTD <emphasis>in
that file</emphasis>. If you use the <literal>scope</literal>
attribute, you <emphasis>must</emphasis> reference either the
<filename>spring-beans-2.0.dtd</filename> DTD or the
<filename>spring-beans-3.0.xsd</filename> XSD <emphasis>in that
file</emphasis>.</para>
</note>
</section> </section>
<section id="beans-factory-scopes-other"> <section id="beans-factory-scopes-other">
@ -2766,7 +2743,9 @@ public class ReplacementComputeValue implements MethodReplacer {
<programlisting language="xml">&lt;web-app&gt; <programlisting language="xml">&lt;web-app&gt;
... ...
&lt;listener&gt; &lt;listener&gt;
&lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt; &lt;listener-class&gt;
org.springframework.web.context.request.RequestContextListener
&lt;/listener-class&gt;
&lt;/listener&gt; &lt;/listener&gt;
... ...
&lt;/web-app&gt;</programlisting> &lt;/web-app&gt;</programlisting>
@ -3131,18 +3110,21 @@ public class ReplacementComputeValue implements MethodReplacer {
<para>Suppose that you write your custom <para>Suppose that you write your custom
<interfacename>Scope</interfacename> implementation, and then register <interfacename>Scope</interfacename> implementation, and then register
it as follows:</para> it as below.</para>
<note>
<para>The example below uses <literal>SimpleThreadScope</literal>
which is included with Spring, but not registered by default. The instructions
would be the same for your own custom <literal>Scope</literal> implementations.</para>
</note>
<programlisting language="java"><lineannotation>// note: the <classname>ThreadScope</classname> class does <emphasis <programlisting language="java">
role="bold">not</emphasis> ship with the Spring Framework</lineannotation> Scope threadScope = new SimpleThreadScope();
Scope customScope = new ThreadScope(); beanFactory.registerScope("<emphasis role="bold">thread</emphasis>", threadScope);</programlisting>
beanFactory.registerScope("<emphasis role="bold">thread</emphasis>", customScope);</programlisting>
<para>You then create bean definitions that adhere to the scoping <para>You then create bean definitions that adhere to the scoping
rules of your custom <interfacename>Scope</interfacename>:</para> rules of your custom <interfacename>Scope</interfacename>:</para>
<programlisting language="xml">&lt;bean id="..." class="..." <emphasis <programlisting language="xml">&lt;bean id="..." class="..." scope="thread"&gt;</programlisting>
role="bold">scope="thread"</emphasis>/&gt;</programlisting>
<para>With a custom <interfacename>Scope</interfacename> <para>With a custom <interfacename>Scope</interfacename>
implementation, you are not limited to programmatic registration of implementation, you are not limited to programmatic registration of
@ -3163,13 +3145,13 @@ beanFactory.registerScope("<emphasis role="bold">thread</emphasis>", customScope
&lt;property name="scopes"&gt; &lt;property name="scopes"&gt;
&lt;map&gt;<emphasis role="bold"> &lt;map&gt;<emphasis role="bold">
&lt;entry key="thread"&gt; &lt;entry key="thread"&gt;
&lt;bean class="com.foo.ThreadScope"/&gt; &lt;bean class="org.springframework.context.support.SimpleThreadScope"/&gt;
&lt;/entry&gt;</emphasis> &lt;/entry&gt;</emphasis>
&lt;/map&gt; &lt;/map&gt;
&lt;/property&gt; &lt;/property&gt;
&lt;/bean&gt; &lt;/bean&gt;
&lt;bean id="bar" class="x.y.Bar" <emphasis role="bold">scope="thread"</emphasis>&gt; &lt;bean id="bar" class="x.y.Bar" scope="thread"&gt;
&lt;property name="name" value="Rick"/&gt; &lt;property name="name" value="Rick"/&gt;
&lt;aop:scoped-proxy/&gt; &lt;aop:scoped-proxy/&gt;
&lt;/bean&gt; &lt;/bean&gt;
@ -3546,7 +3528,7 @@ public final class Boot {
<interfacename>BeanFactory</interfacename> type if the field, <interfacename>BeanFactory</interfacename> type if the field,
constructor, or method in question carries the constructor, or method in question carries the
<interfacename>@Autowired</interfacename> annotation. For more <interfacename>@Autowired</interfacename> annotation. For more
information, see the section entitled <xref information, see <xref
linkend="beans-autowired-annotation" />.</para> linkend="beans-autowired-annotation" />.</para>
<para>When an ApplicationContext creates a class that implements the <para>When an ApplicationContext creates a class that implements the
@ -3792,11 +3774,13 @@ import org.springframework.beans.BeansException;
public class InstantiationTracingBeanPostProcessor implements BeanPostProcessor { public class InstantiationTracingBeanPostProcessor implements BeanPostProcessor {
<lineannotation>// simply return the instantiated bean as-is</lineannotation> <lineannotation>// simply return the instantiated bean as-is</lineannotation>
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { public Object postProcessBeforeInitialization(Object bean, String beanName)
throws BeansException {
return bean; <lineannotation>// we could potentially return <emphasis>any</emphasis> object reference here...</lineannotation> return bean; <lineannotation>// we could potentially return <emphasis>any</emphasis> object reference here...</lineannotation>
} }
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { public Object postProcessAfterInitialization(Object bean, String beanName)
throws BeansException {
System.out.println("Bean '" + beanName + "' created : " + bean.toString()); System.out.println("Bean '" + beanName + "' created : " + bean.toString());
return bean; return bean;
} }
@ -3862,8 +3846,7 @@ org.springframework.scripting.groovy.GroovyMessenger@272961</programlisting>
<para>Using callback interfaces or annotations in conjunction with a <para>Using callback interfaces or annotations in conjunction with a
custom <interfacename>BeanPostProcessor</interfacename> implementation custom <interfacename>BeanPostProcessor</interfacename> implementation
is a common means of extending the Spring IoC container. An example is is a common means of extending the Spring IoC container. An example is
shown in the section entitled <xref shown in <xref linkend="metadata-annotations-required" /> which demonstrates the
linkend="metadata-annotations-required" /> which demonstrates the
usage of a custom <interfacename>BeanPostProcessor</interfacename> usage of a custom <interfacename>BeanPostProcessor</interfacename>
implementation that ships with the Spring distribution which ensures implementation that ships with the Spring distribution which ensures
that JavaBean properties on beans that are marked with an (arbitrary) that JavaBean properties on beans that are marked with an (arbitrary)
@ -3907,8 +3890,7 @@ org.springframework.scripting.groovy.GroovyMessenger@272961</programlisting>
<emphasis>instances</emphasis> (the objects that are created from the <emphasis>instances</emphasis> (the objects that are created from the
configuration metadata), then you instead need to use a configuration metadata), then you instead need to use a
<interfacename>BeanPostProcessor</interfacename> (described above in <interfacename>BeanPostProcessor</interfacename> (described above in
the section entitled <xref <xref linkend="beans-factory-extension-bpp" />.</para>
linkend="beans-factory-extension-bpp" />.</para>
<para>Also, <literal>BeanFactoryPostProcessors</literal> are scoped <para>Also, <literal>BeanFactoryPostProcessors</literal> are scoped
<emphasis>per-container</emphasis>. This is only relevant if you are <emphasis>per-container</emphasis>. This is only relevant if you are
@ -4292,11 +4274,12 @@ dataSource.url=jdbc:mysql:mydb</programlisting>
<programlisting language="java">public class MovieRecommender { <programlisting language="java">public class MovieRecommender {
private MovieCatalog movieCatalog; private MovieCatalog movieCatalog;
private CustomerPreferenceDao customerPreferenceDao; private CustomerPreferenceDao customerPreferenceDao;
@Autowired @Autowired
public void prepare(MovieCatalog movieCatalog, CustomerPreferenceDao customerPreferenceDao) { public void prepare(MovieCatalog movieCatalog,
CustomerPreferenceDao customerPreferenceDao) {
this.movieCatalog = movieCatalog; this.movieCatalog = movieCatalog;
this.customerPreferenceDao = customerPreferenceDao; this.customerPreferenceDao = customerPreferenceDao;
} }
@ -4460,7 +4443,8 @@ dataSource.url=jdbc:mysql:mydb</programlisting>
private CustomerPreferenceDao customerPreferenceDao; private CustomerPreferenceDao customerPreferenceDao;
@Autowired @Autowired
public void prepare(<emphasis role="bold">@Qualifier("main")</emphasis> MovieCatalog movieCatalog, CustomerPreferenceDao customerPreferenceDao) { public void prepare(<emphasis role="bold">@Qualifier("main")</emphasis> MovieCatalog movieCatalog,
CustomerPreferenceDao customerPreferenceDao) {
this.movieCatalog = movieCatalog; this.movieCatalog = movieCatalog;
this.customerPreferenceDao = customerPreferenceDao; this.customerPreferenceDao = customerPreferenceDao;
} }
@ -4668,14 +4652,14 @@ public @interface Offline {
public @interface MovieQualifier { public @interface MovieQualifier {
String genre(); String genre();
Format format(); Format format();
}</programlisting> }</programlisting>
<para>In this case <literal>Format</literal> is an enum:</para> <para>In this case <literal>Format</literal> is an enum:</para>
<programlisting language="java">public enum Format { <programlisting language="java">public enum Format {
VHS, DVD, BLURAY VHS, DVD, BLURAY
}</programlisting> }</programlisting>
@ -4766,7 +4750,8 @@ public @interface MovieQualifier {
if they are not annotated with Spring's if they are not annotated with Spring's
<interfacename>@Qualifier</interfacename> annotation.</para> <interfacename>@Qualifier</interfacename> annotation.</para>
<programlisting language="xml">&lt;bean id="customAutowireConfigurer" class="org.springframework.beans.factory.annotation.CustomAutowireConfigurer"&gt; <programlisting language="xml">&lt;bean id="customAutowireConfigurer"
class="org.springframework.beans.factory.annotation.CustomAutowireConfigurer"&gt;
&lt;property name="customQualifierTypes"&gt; &lt;property name="customQualifierTypes"&gt;
&lt;set&gt; &lt;set&gt;
&lt;value&gt;example.CustomQualifier&lt;/value&gt; &lt;value&gt;example.CustomQualifier&lt;/value&gt;
@ -4887,7 +4872,7 @@ public @interface MovieQualifier {
only recognizes the <interfacename>@Resource</interfacename> annotation only recognizes the <interfacename>@Resource</interfacename> annotation
but also the JSR-250 <emphasis>lifecycle</emphasis> annotations. but also the JSR-250 <emphasis>lifecycle</emphasis> annotations.
Introduced in Spring 2.5, the support for these annotations offers yet Introduced in Spring 2.5, the support for these annotations offers yet
another alternative to those described in the sections on <link another alternative to those described in <link
linkend="beans-factory-lifecycle-initializingbean">initialization linkend="beans-factory-lifecycle-initializingbean">initialization
callbacks</link> and <link callbacks</link> and <link
linkend="beans-factory-lifecycle-disposablebean">destruction linkend="beans-factory-lifecycle-disposablebean">destruction
@ -5140,10 +5125,11 @@ public class JpaMovieFinder implements MovieFinder {
<row> <row>
<entry>custom</entry> <entry>custom</entry>
<entry><literal>org.example.MyCustomTypeFilter</literal></entry> <entry><literal>org.example.MyTypeFilter</literal></entry>
<entry>A custom implementation of the <entry>A custom implementation of the
<interfacename>org.springframework.core.type.TypeFilter</interfacename> <interfacename>org.springframework.core.type
.TypeFilter</interfacename>
interface.</entry> interface.</entry>
</row> </row>
</tbody> </tbody>
@ -5154,11 +5140,12 @@ public class JpaMovieFinder implements MovieFinder {
<interfacename>@Repository</interfacename> annotations and using "stub" <interfacename>@Repository</interfacename> annotations and using "stub"
repositories instead.</para> repositories instead.</para>
<programlisting language="xml">&lt;beans ...&gt; <programlisting language="xml">&lt;beans&gt;
&lt;context:component-scan base-package="org.example"&gt; &lt;context:component-scan base-package="org.example"&gt;
&lt;context:include-filter type="regex" expression=".*Stub.*Repository"/&gt; &lt;context:include-filter type="regex" expression=".*Stub.*Repository"/&gt;
&lt;context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository"/&gt; &lt;context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Repository"/&gt;
&lt;/context:component-scan&gt; &lt;/context:component-scan&gt;
&lt;/beans&gt;</programlisting> &lt;/beans&gt;</programlisting>
@ -5184,22 +5171,21 @@ public class JpaMovieFinder implements MovieFinder {
<literal>@Configuration</literal> annotated classes. Here is a simple <literal>@Configuration</literal> annotated classes. Here is a simple
example:</para> example:</para>
<programlisting>@Component <programlisting language="java">@Component
public class FactoryMethodComponent { public class FactoryMethodComponent {
@Bean @Qualifier("public") @Bean @Qualifier("public")
public TestBean publicInstance() { public TestBean publicInstance() {
return new TestBean("publicInstance"); return new TestBean("publicInstance");
} }
public void DoWork() public void doWork() {
{ // Component method implementation omitted
// Component method implementation omitted }
}
}</programlisting> }</programlisting>
<para>This class is a Spring component that has application-specific <para>This class is a Spring component that has application-specific
code contained in its <methodname>DoWork</methodname> method. However, code contained in its <methodname>doWork</methodname> method. However,
it also contributes a bean definition that has a factory method it also contributes a bean definition that has a factory method
referring to the method <methodname>publicInstance</methodname>. The referring to the method <methodname>publicInstance</methodname>. The
<literal>@Bean</literal> annotation identifies the factory method and <literal>@Bean</literal> annotation identifies the factory method and
@ -5208,37 +5194,39 @@ public class FactoryMethodComponent {
annotations that can be specified are <literal>@Scope</literal>, annotations that can be specified are <literal>@Scope</literal>,
<literal>@Lazy</literal>, and custom qualifier annotations. Autowired <literal>@Lazy</literal>, and custom qualifier annotations. Autowired
fields and methods are supported as previously discussed, with fields and methods are supported as previously discussed, with
additional support for autowiring of @Bean methods:</para> additional support for autowiring of <literal>@Bean</literal> methods:</para>
<programlisting language="java">@Component <programlisting language="java">@Component
public class FactoryMethodComponent { public class FactoryMethodComponent {
private static int i; private static int i;
@Bean @Qualifier("public") @Bean @Qualifier("public")
public TestBean publicInstance() { public TestBean publicInstance() {
return new TestBean("publicInstance"); return new TestBean("publicInstance");
} }
// use of a custom qualifier and autowiring of method parameters // use of a custom qualifier and autowiring of method parameters
@Bean @BeanAge(1) @Bean @BeanAge(1)
protected TestBean protectedInstance(@Qualifier("public") TestBean spouse, @Value("#{privateInstance.age}") String country) { protected TestBean protectedInstance(@Qualifier("public") TestBean spouse,
TestBean tb = new TestBean("protectedInstance", 1); @Value("#{privateInstance.age}") String country) {
tb.setSpouse(tb); TestBean tb = new TestBean("protectedInstance", 1);
tb.setCountry(country); tb.setSpouse(tb);
return tb; tb.setCountry(country);
} return tb;
}
@Bean @Scope(BeanDefinition.SCOPE_SINGLETON) @Bean @Scope(BeanDefinition.SCOPE_SINGLETON)
private TestBean privateInstance() { private TestBean privateInstance() {
return new TestBean("privateInstance", i++); return new TestBean("privateInstance", i++);
} }
@Bean @Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS) @Bean @Scope(value = WebApplicationContext.SCOPE_SESSION,
public TestBean requestScopedInstance() { proxyMode = ScopedProxyMode.TARGET_CLASS)
return new TestBean("requestScopedInstance", 3); public TestBean requestScopedInstance() {
} return new TestBean("requestScopedInstance", 3);
}
} }
</programlisting> </programlisting>
@ -5304,7 +5292,7 @@ public class MovieFinderImpl implements MovieFinder {
scanner:</para> scanner:</para>
</note> </note>
<programlisting language="xml">&lt;beans ...&gt; <programlisting language="xml">&lt;beans&gt;
&lt;context:component-scan base-package="org.example" &lt;context:component-scan base-package="org.example"
name-generator="org.example.MyNameGenerator" /&gt; name-generator="org.example.MyNameGenerator" /&gt;
@ -5341,7 +5329,7 @@ public class MovieFinderImpl implements MovieFinder {
scanner:</para> scanner:</para>
</note> </note>
<programlisting language="xml">&lt;beans ...&gt; <programlisting language="xml">&lt;beans&gt;
&lt;context:component-scan base-package="org.example" &lt;context:component-scan base-package="org.example"
scope-resolver="org.example.MyScopeResolver" /&gt; scope-resolver="org.example.MyScopeResolver" /&gt;
@ -5356,7 +5344,7 @@ public class MovieFinderImpl implements MovieFinder {
interfaces, and targetClass. For example, the following configuration interfaces, and targetClass. For example, the following configuration
will result in standard JDK dynamic proxies:</para> will result in standard JDK dynamic proxies:</para>
<programlisting language="xml">&lt;beans ...&gt; <programlisting language="xml">&lt;beans&gt;
&lt;context:component-scan base-package="org.example" &lt;context:component-scan base-package="org.example"
scoped-proxy="interfaces" /&gt; scoped-proxy="interfaces" /&gt;
@ -5528,8 +5516,7 @@ public class AppConfig {
<interfacename>@Configuration</interfacename>-annotated class supports <interfacename>@Configuration</interfacename>-annotated class supports
the regular lifecycle callbacks. Any classes defined with the @Bean the regular lifecycle callbacks. Any classes defined with the @Bean
annotation can use the @PostConstruct and @PreDestroy annotations from annotation can use the @PostConstruct and @PreDestroy annotations from
JSR-250, see the section on <link JSR-250, see <link linkend="beans-factory-lifecycle-combined-effects">JSR-250
linkend="beans-factory-lifecycle-combined-effects">JSR-250
annotations</link> for further details.</para> annotations</link> for further details.</para>
<para>The regular Spring <link <para>The regular Spring <link
@ -5540,13 +5527,13 @@ public class AppConfig {
<para>The standard set of <code>*Aware</code> interfaces such as <para>The standard set of <code>*Aware</code> interfaces such as
<code><link <code><link
linkend="beans-factory-aware-beanfactoryaware">BeanFactoryAware</link></code>, linkend="beans-beanfactory">BeanFactoryAware</link></code>,
<code><link <code><link
linkend="beans-factory-aware-beannameaware">BeanNameAware</link></code>, linkend="beans-factory-aware">BeanNameAware</link></code>,
<code><link <code><link
linkend="context-functionality-messagesource">MessageSourceAware</link></code>, linkend="context-functionality-messagesource">MessageSourceAware</link></code>,
<code><link <code><link
linkend="context-functionality-events">ApplicationContextAware</link></code>, linkend="beans-factory-aware">ApplicationContextAware</link></code>,
and so on are also fully supported.</para> and so on are also fully supported.</para>
<para>The <interfacename>@Bean</interfacename> annotation supports <para>The <interfacename>@Bean</interfacename> annotation supports
@ -5716,7 +5703,7 @@ public CommandManager commandManager() {
the <code>name</code> attribute. <programlisting language="java">@Configuration the <code>name</code> attribute. <programlisting language="java">@Configuration
public class AppConfig { public class AppConfig {
@Bean(name = "bar") @Bean(name = "myFoo")
public Foo foo() { public Foo foo() {
return new Foo(); return new Foo();
} }
@ -5732,7 +5719,7 @@ public class AppConfig {
<para>The <literal>context</literal> namespace introduced in Spring 2.5 <para>The <literal>context</literal> namespace introduced in Spring 2.5
provides a <literal>load-time-weaver</literal> element.<!--Need to explain purpose of LoadTimeWeaver? Is this section ok here? --></para> provides a <literal>load-time-weaver</literal> element.<!--Need to explain purpose of LoadTimeWeaver? Is this section ok here? --></para>
<programlisting language="xml">&lt;beans ...&gt; <programlisting language="xml">&lt;beans&gt;
&lt;context:load-time-weaver/&gt; &lt;context:load-time-weaver/&gt;

6
spring-framework-reference/src/cci.xml

@ -448,8 +448,7 @@
<para>This property simply holds an implementation of the <para>This property simply holds an implementation of the
<interfacename>RecordCreator</interfacename> interface, used for that <interfacename>RecordCreator</interfacename> interface, used for that
purpose. The <interfacename>RecordCreator</interfacename> interface has purpose. The <interfacename>RecordCreator</interfacename> interface has
already been discussed in the section entitled <xref already been discussed in <xref linkend="cci-record-creator" />. The
linkend="cci-record-creator" />. The
<literal>outputRecordCreator</literal> property must be directly <literal>outputRecordCreator</literal> property must be directly
specified on the <classname>CciTemplate</classname>. This could be done specified on the <classname>CciTemplate</classname>. This could be done
in the application code like so:</para> in the application code like so:</para>
@ -880,8 +879,7 @@ MyMappingRecordOperation eisOperation = new MyMappingRecordOperation(getConnecti
output records as with <classname>CciTemplate</classname> is available. output records as with <classname>CciTemplate</classname> is available.
Every operation object provides a corresponding Every operation object provides a corresponding
<literal>setOutputRecordCreator(..)</literal> method. For further <literal>setOutputRecordCreator(..)</literal> method. For further
information, see the section entitled <xref information, see <xref linkend="automatic-output-generation" />.</para>
linkend="automatic-output-generation" />.</para>
</section> </section>
<section id="cci-object-summary"> <section id="cci-object-summary">

8
spring-framework-reference/src/classic-aop-spring.xml

@ -825,7 +825,7 @@ public interface IntroductionInfo {
<para>Specify the target you want to proxy.</para> <para>Specify the target you want to proxy.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Specify whether to use CGLIB (see below and also the section entitled <para>Specify whether to use CGLIB (see below and also
<xref linkend="aop-pfb-proxy-types"/>).</para> <xref linkend="aop-pfb-proxy-types"/>).</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
@ -840,8 +840,7 @@ public interface IntroductionInfo {
<literal>proxyTargetClass</literal>: <literal>true</literal> if the <literal>proxyTargetClass</literal>: <literal>true</literal> if the
target class is to be proxied, rather than the target class' interfaces. target class is to be proxied, rather than the target class' interfaces.
If this property value is set to <literal>true</literal>, then CGLIB proxies If this property value is set to <literal>true</literal>, then CGLIB proxies
will be created (but see also below the section entitled will be created (but see also below <xref linkend="aop-pfb-proxy-types"/>).
<xref linkend="aop-pfb-proxy-types"/>).
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
@ -890,8 +889,7 @@ public interface IntroductionInfo {
<para> <para>
<literal>proxyInterfaces</literal>: array of String interface <literal>proxyInterfaces</literal>: array of String interface
names. If this isn't supplied, a CGLIB proxy for the target class names. If this isn't supplied, a CGLIB proxy for the target class
will be used (but see also below the section entitled will be used (but see also below <xref linkend="aop-pfb-proxy-types"/>).
<xref linkend="aop-pfb-proxy-types"/>).
</para> </para>
</listitem> </listitem>
<listitem> <listitem>

31
spring-framework-reference/src/dynamic-languages.xml

@ -42,7 +42,7 @@
</itemizedlist> </itemizedlist>
<para> <para>
Fully working examples of where this dynamic language support can be immediately useful Fully working examples of where this dynamic language support can be immediately useful
are described in the section entitled <xref linkend="dynamic-language-scenarios"/>. are described in <xref linkend="dynamic-language-scenarios"/>.
</para> </para>
<para> <para>
<emphasis>Note:</emphasis> Only the specific versions as listed above are supported <emphasis>Note:</emphasis> Only the specific versions as listed above are supported
@ -167,8 +167,8 @@ http://www.springframework.org/schema/lang http://www.springframework.org/schema
idioms of the supported dynamic languages. For example, if you want to idioms of the supported dynamic languages. For example, if you want to
use Groovy to write certain of the classes in your application, then the use Groovy to write certain of the classes in your application, then the
assumption is that you already know Groovy. If you need further details assumption is that you already know Groovy. If you need further details
about the dynamic languages themselves, please consult the section about the dynamic languages themselves, please consult
entitled <xref linkend="dynamic-language-resources" /> at the end of this chapter. <xref linkend="dynamic-language-resources" /> at the end of this chapter.
</para> </para>
<section id="dynamic-language-beans-concepts"> <section id="dynamic-language-beans-concepts">
@ -388,7 +388,7 @@ class GroovyMessenger implements Messenger {
The refreshable bean behavior described above does The refreshable bean behavior described above does
<emphasis>not</emphasis> apply to dynamic language source files <emphasis>not</emphasis> apply to dynamic language source files
defined using the <literal>&lt;lang:inline-script/&gt;</literal> element defined using the <literal>&lt;lang:inline-script/&gt;</literal> element
notation (see the section entitled <xref linkend="dynamic-language-beans-inline" />). notation (see <xref linkend="dynamic-language-beans-inline" />).
Additionally, it <emphasis>only</emphasis> applies to beans where Additionally, it <emphasis>only</emphasis> applies to beans where
changes to the underlying source file can actually be detected; changes to the underlying source file can actually be detected;
for example, by code that checks the last modified date of a for example, by code that checks the last modified date of a
@ -426,8 +426,8 @@ class GroovyMessenger implements Messenger {
some scenarios. For instance, we might want to quickly add a Spring some scenarios. For instance, we might want to quickly add a Spring
<interfacename>Validator</interfacename> implementation to a Spring MVC <interfacename>Validator</interfacename> implementation to a Spring MVC
<interfacename>Controller</interfacename>. This is but a moment's work <interfacename>Controller</interfacename>. This is but a moment's work
using inline source. (See the section entitled using inline source. (See <xref linkend="dynamic-language-scenarios-validators" />
<xref linkend="dynamic-language-scenarios-validators" /> for such an example.) for such an example.)
</para> </para>
<para> <para>
Find below an example of defining the source for a JRuby-based bean Find below an example of defining the source for a JRuby-based bean
@ -629,7 +629,7 @@ RubyMessenger.new]]></programlisting>
source file as a whole must return an object (for Spring to configure). source file as a whole must return an object (for Spring to configure).
</para> </para>
<para> <para>
See the section entitled <xref linkend="dynamic-language-scenarios" /> for some See <xref linkend="dynamic-language-scenarios" /> for some
scenarios where you might want to use JRuby-based beans. scenarios where you might want to use JRuby-based beans.
</para> </para>
</section> </section>
@ -711,8 +711,8 @@ public class Main {
(unsurprisingly) <computeroutput>10</computeroutput>. (unsurprisingly) <computeroutput>10</computeroutput>.
(Exciting example, huh? Remember that the intent is to illustrate the (Exciting example, huh? Remember that the intent is to illustrate the
concept. Please consult the dynamic language showcase project for a concept. Please consult the dynamic language showcase project for a
more complex example, or indeed the section entitled more complex example, or indeed <xref linkend="dynamic-language-scenarios" />
<xref linkend="dynamic-language-scenarios" /> later in this chapter). later in this chapter).
</para> </para>
<para> <para>
It is important that you <emphasis>do not</emphasis> define more than one It is important that you <emphasis>do not</emphasis> define more than one
@ -865,7 +865,7 @@ void setMessage(String aMessage) {
<lang:property name="message" value="Hello World!" /> <lang:property name="message" value="Hello World!" />
</lang:bsh>]]></programlisting> </lang:bsh>]]></programlisting>
<para>See the section entitled <xref linkend="dynamic-language-scenarios" /> for some <para>See <xref linkend="dynamic-language-scenarios" /> for some
scenarios where you might want to use BeanShell-based beans.</para> scenarios where you might want to use BeanShell-based beans.</para>
</section> </section>
</section> </section>
@ -907,7 +907,7 @@ void setMessage(String aMessage) {
<para> <para>
In order to effect this automatic 'pickup' of any changes In order to effect this automatic 'pickup' of any changes
to dynamic-language-backed beans, you will have had to enable the to dynamic-language-backed beans, you will have had to enable the
'refreshable beans' functionality. See the section entitle 'refreshable beans' functionality. See
<xref linkend="dynamic-language-refreshable-beans"/> for a full treatment <xref linkend="dynamic-language-refreshable-beans"/> for a full treatment
of this feature. of this feature.
</para> </para>
@ -966,7 +966,7 @@ class FortuneController implements Controller {
<para> <para>
Please note that in order to effect the automatic 'pickup' of any changes Please note that in order to effect the automatic 'pickup' of any changes
to dynamic-language-backed beans, you will have had to enable the to dynamic-language-backed beans, you will have had to enable the
'refreshable beans' feature. See the section entitled 'refreshable beans' feature. See
<xref linkend="dynamic-language-refreshable-beans"/> for a full and <xref linkend="dynamic-language-refreshable-beans"/> for a full and
detailed treatment of this feature. detailed treatment of this feature.
</para> </para>
@ -974,9 +974,8 @@ class FortuneController implements Controller {
<para> <para>
Find below an example of a Spring Find below an example of a Spring
<interfacename>org.springframework.validation.Validator</interfacename> <interfacename>org.springframework.validation.Validator</interfacename>
implemented using the Groovy dynamic language. (See the section entitled implemented using the Groovy dynamic language. (See <xref linkend="validator"/>
<xref linkend="validator"/> for a discussion of the for a discussion of the <interfacename>Validator</interfacename> interface.)
<interfacename>Validator</interfacename> interface.)
</para> </para>
<programlisting source="java"><![CDATA[import org.springframework.validation.Validator <programlisting source="java"><![CDATA[import org.springframework.validation.Validator
import org.springframework.validation.Errors import org.springframework.validation.Errors
@ -1057,7 +1056,7 @@ http://www.springframework.org/schema/lang http://www.springframework.org/schema
</beans>]]></programlisting> </beans>]]></programlisting>
<para> <para>
See the section entitled <xref linkend="beans-factory-scopes"/> in <xref linkend="beans"/> See <xref linkend="beans-factory-scopes"/> in <xref linkend="beans"/>
for a fuller discussion of the scoping support in the Spring Framework. for a fuller discussion of the scoping support in the Spring Framework.
</para> </para>
</section> </section>

6
spring-framework-reference/src/expressions.xml

@ -407,7 +407,7 @@ Boolean b = simple.booleanList.get(0);
@Autowired @Autowired
public void configure(MovieFinder movieFinder, public void configure(MovieFinder movieFinder,
@Value("#{ systemProperties['user.region']"} String defaultLocale) { @Value("#{ systemProperties['user.region'] }"} String defaultLocale) {
this.movieFinder = movieFinder; this.movieFinder = movieFinder;
this.defaultLocale = defaultLocale; this.defaultLocale = defaultLocale;
} }
@ -418,12 +418,12 @@ Boolean b = simple.booleanList.get(0);
<para><programlisting language="java">public class MovieRecommender { <para><programlisting language="java">public class MovieRecommender {
private String defaultLocale; private String defaultLocale;
private CustomerPreferenceDao customerPreferenceDao; private CustomerPreferenceDao customerPreferenceDao;
@Autowired @Autowired
public MovieRecommender(CustomerPreferenceDao customerPreferenceDao, public MovieRecommender(CustomerPreferenceDao customerPreferenceDao,
@Value("#{ systemProperties['user.country']"} String defaultLocale) { @Value("#{systemProperties['user.country']}"} String defaultLocale) {
this.customerPreferenceDao = customerPreferenceDao; this.customerPreferenceDao = customerPreferenceDao;
this.defaultLocale = defaultLocale; this.defaultLocale = defaultLocale;
} }

11
spring-framework-reference/src/jdbc.xml

@ -602,7 +602,7 @@ public int countOfActors(Actor exampleActor) {
<interfacename>JdbcOperations</interfacename> <interfacename>JdbcOperations</interfacename>
interface</emphasis>.</para> interface</emphasis>.</para>
<para>See also the section entitled <xref <para>See also <xref
linkend="jdbc-JdbcTemplate-idioms" /> for some advice on how to best use linkend="jdbc-JdbcTemplate-idioms" /> for some advice on how to best use
the <classname>NamedParameterJdbcTemplate</classname> class in the the <classname>NamedParameterJdbcTemplate</classname> class in the
context of an application.</para> context of an application.</para>
@ -696,10 +696,9 @@ public Actor findActor(String specialty, int age) {
return this.simpleJdbcTemplate.queryForObject(sql, mapper, specialty, age); return this.simpleJdbcTemplate.queryForObject(sql, mapper, specialty, age);
}</programlisting> }</programlisting>
<para>See also the section entitled <xref <para>See also <xref linkend="jdbc-JdbcTemplate-idioms" />
linkend="jdbc-JdbcTemplate-idioms" /> for some advice on how to best use for some advice on how to best use the <classname>SimpleJdbcTemplate</classname>
the <classname>SimpleJdbcTemplate</classname> class in the context of an class in the context of an application.</para>
application.</para>
<note> <note>
<para>The <classname>SimpleJdbcTemplate</classname> class only offers <para>The <classname>SimpleJdbcTemplate</classname> class only offers
@ -2755,4 +2754,4 @@ public class DataAccessUnitTestTemplate {
]]></programlisting> ]]></programlisting>
</section> </section>
</section> </section>
</chapter> </chapter>

12
spring-framework-reference/src/jms.xml

@ -260,9 +260,8 @@
<para>One of the most common uses of JMS messages in the EJB world is to <para>One of the most common uses of JMS messages in the EJB world is to
drive message-driven beans (MDBs). Spring offers a solution to create drive message-driven beans (MDBs). Spring offers a solution to create
message-driven POJOs (MDPs) in a way that does not tie a user to an EJB message-driven POJOs (MDPs) in a way that does not tie a user to an EJB
container. (See the section entitled <xref container. (See <xref linkend="jms-asynchronousMessageReception" />
linkend="jms-asynchronousMessageReception" /> for detailed coverage of for detailed coverage of Spring's MDP support.)</para>
Spring's MDP support.)</para>
<para>A message listener container is used to receive messages from a <para>A message listener container is used to receive messages from a
JMS message queue and drive the MessageListener that is injected into JMS message queue and drive the MessageListener that is injected into
@ -955,10 +954,9 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
<para>The example above is equivalent to creating two distinct listener <para>The example above is equivalent to creating two distinct listener
container bean definitions and two distinct container bean definitions and two distinct
<classname>MessageListenerAdapter</classname> bean definitions as <classname>MessageListenerAdapter</classname> bean definitions as
demonstrated in the section entitled <xref demonstrated in <xref linkend="jms-receiving-async-message-listener-adapter" />.
linkend="jms-receiving-async-message-listener-adapter" />. In addition to In addition to the attributes shown above, the <literal>listener</literal> element
the attributes shown above, the <literal>listener</literal> element may may contain several optional ones. The following table describes all available
contain several optional ones. The following table describes all available
attributes:</para> attributes:</para>
<table id="jms-namespace-listener-tbl"> <table id="jms-namespace-listener-tbl">

14
spring-framework-reference/src/jmx.xml

@ -18,8 +18,7 @@
<para>This chapter is not an introduction to JMX... it doesn't try to <para>This chapter is not an introduction to JMX... it doesn't try to
explain the motivations of why one might want to use JMX (or indeed what explain the motivations of why one might want to use JMX (or indeed what
the letters JMX actually stand for). If you are new to JMX, check out the letters JMX actually stand for). If you are new to JMX, check out
the section entitled <xref linkend="jmx-resources" /> at the end of this <xref linkend="jmx-resources" /> at the end of this chapter.</para>
chapter.</para>
</sidebar> </sidebar>
<para>Specifically, Spring's JMX support provides four core <para>Specifically, Spring's JMX support provides four core
@ -128,7 +127,7 @@ public class JmxTestBean implements IJmxTestBean {
<literal>beans</literal> <interfacename>Map</interfacename> is used as the <literal>beans</literal> <interfacename>Map</interfacename> is used as the
<classname>ObjectName</classname> for the bean referenced by the <classname>ObjectName</classname> for the bean referenced by the
corresponding entry value. This behavior can be changed as described in corresponding entry value. This behavior can be changed as described in
the section entitled <xref linkend="jmx-naming"/>.</para> <xref linkend="jmx-naming"/>.</para>
<para>With this configuration the <literal>testBean</literal> bean is <para>With this configuration the <literal>testBean</literal> bean is
exposed as an MBean under the <classname>ObjectName</classname> exposed as an MBean under the <classname>ObjectName</classname>
@ -270,8 +269,7 @@ public class JmxTestBean implements IJmxTestBean {
already a valid JMX MBean and will be automatically registered by already a valid JMX MBean and will be automatically registered by
Spring. By default, beans that are autodetected for JMX registration Spring. By default, beans that are autodetected for JMX registration
have their bean name used as the <classname>ObjectName</classname>. This have their bean name used as the <classname>ObjectName</classname>. This
behavior can be overridden as detailed in the section entitled behavior can be overridden as detailed in <xref linkend="jmx-naming" />.</para>
<xref linkend="jmx-naming" />.</para>
</section> </section>
<section id="jmx-exporting-registration-behavior"> <section id="jmx-exporting-registration-behavior">
@ -954,8 +952,8 @@ public class AnnotationTestBean implements IJmxTestBean {
to include it. The only problem with this approach is that the name of to include it. The only problem with this approach is that the name of
the <classname>JmxTestBean</classname> now has business meaning. You can the <classname>JmxTestBean</classname> now has business meaning. You can
address this issue by changing the default behavior for address this issue by changing the default behavior for
<classname>ObjectName</classname> creation as defined in the section <classname>ObjectName</classname> creation as defined in
entitled <xref linkend="jmx-naming" />.</para> <xref linkend="jmx-naming" />.</para>
</section> </section>
<section id="jmx-interface-java"> <section id="jmx-interface-java">
@ -1760,4 +1758,4 @@ public class JmxTestBean implements IJmxTestBean, NotificationPublisherAware {
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</section> </section>
</chapter> </chapter>

31
spring-framework-reference/src/new-in-2.xml

@ -66,8 +66,8 @@
existing configuration needs to change, and no existing configuration existing configuration needs to change, and no existing configuration
will break.</para> will break.</para>
<para>Both the new and the original scopes are detailed in the section <para>Both the new and the original scopes are detailed in
entitled <xref linkend="beans-factory-scopes"/>.</para> <xref linkend="beans-factory-scopes"/>.</para>
</section> </section>
<section id="new-in-2-ioc-configuration"> <section id="new-in-2-ioc-configuration">
@ -77,8 +77,7 @@
of the new XML configuration syntax based on XML Schema. If you want to of the new XML configuration syntax based on XML Schema. If you want to
take advantage of the new tags that Spring provides (and the Spring team take advantage of the new tags that Spring provides (and the Spring team
certainly suggest that you do because they make configuration less certainly suggest that you do because they make configuration less
verbose and easier to read), then do read the section entitled <xref verbose and easier to read), then do read <xref linkend="xsd-config"/>.</para>
linkend="xsd-config"/>.</para>
<para>On a related note, there is a new, updated DTD for Spring 2.0 that <para>On a related note, there is a new, updated DTD for Spring 2.0 that
you may wish to reference if you cannot take advantage of the XML you may wish to reference if you cannot take advantage of the XML
@ -169,8 +168,7 @@
backed by regular Java objects. This support takes advantage of the backed by regular Java objects. This support takes advantage of the
AspectJ pointcut language and offers fully typed advice (i.e. no more AspectJ pointcut language and offers fully typed advice (i.e. no more
casting and <literal>Object[]</literal> argument manipulation). Details casting and <literal>Object[]</literal> argument manipulation). Details
of this support can be found in the section entitled <xref of this support can be found in <xref linkend="aop-schema"/>.</para>
linkend="aop-schema"/>.</para>
</section> </section>
<section id="new-in-2-aop-aspectj"> <section id="new-in-2-aop-aspectj">
@ -258,9 +256,8 @@
usage patterns.</para> usage patterns.</para>
<para>If you are interested in using a JPA-implementation as the <para>If you are interested in using a JPA-implementation as the
backbone of your persistence layer, the section entitled <xref backbone of your persistence layer, <xref linkend="orm-jpa"/> is
linkend="orm-jpa"/> is dedicated to detailing Spring's support and dedicated to detailing Spring's support and value-add in this area.</para>
value-add in this area.</para>
<para>Spring 2.5 upgrades its OpenJPA support to OpenJPA 1.0, <para>Spring 2.5 upgrades its OpenJPA support to OpenJPA 1.0,
with support for advanced features such as savepoints.</para> with support for advanced features such as savepoints.</para>
@ -277,7 +274,7 @@
receiving of messages.</para> receiving of messages.</para>
<para>Spring 2.0 now ships with full support for the reception of <para>Spring 2.0 now ships with full support for the reception of
messages in an asynchronous fashion, as detailed in the section entitled messages in an asynchronous fashion, as detailed in
<xref linkend="jms-asynchronousMessageReception"/>.</para> <xref linkend="jms-asynchronousMessageReception"/>.</para>
<para>As of Spring 2.5, the JCA style of setting up asynchronous <para>As of Spring 2.5, the JCA style of setting up asynchronous
@ -339,7 +336,7 @@
of (always good-to-have) consistency across a codebase.</para> of (always good-to-have) consistency across a codebase.</para>
<para>Spring MVC's convention-over-configuration support is detailed in <para>Spring MVC's convention-over-configuration support is detailed in
the section entitled <xref linkend="mvc-coc"/></para> <xref linkend="mvc-coc"/></para>
</section> </section>
<section id="new-in-2-web-portlet"> <section id="new-in-2-web-portlet">
@ -347,8 +344,7 @@
<para>Spring 2.0 ships with a Portlet framework that is conceptually <para>Spring 2.0 ships with a Portlet framework that is conceptually
similar to the Spring MVC framework. Detailed coverage of the Spring similar to the Spring MVC framework. Detailed coverage of the Spring
Portlet framework can be found in the section entitled <xref Portlet framework can be found in <xref linkend="portlet"/>.</para>
linkend="portlet"/>.</para>
</section> </section>
<section id="new-in-2-web-annotations"> <section id="new-in-2-web-annotations">
@ -376,7 +372,7 @@
the job of authoring JSP pages much easier when using Spring MVC; the the job of authoring JSP pages much easier when using Spring MVC; the
Spring team is confident it will satisfy all of those developers who Spring team is confident it will satisfy all of those developers who
voted for the issue on JIRA. The new tag library is itself covered in voted for the issue on JIRA. The new tag library is itself covered in
the section entitled <xref linkend="view-jsp-formtaglib"/>, and a quick <xref linkend="view-jsp-formtaglib"/>, and a quick
reference to all of the new tags can be found in the appendix entitled reference to all of the new tags can be found in the appendix entitled
<xref linkend="spring-form.tld"/>.</para> <xref linkend="spring-form.tld"/>.</para>
</section> </section>
@ -419,7 +415,7 @@
<para>Spring 2.0 introduced support for beans written in languages other <para>Spring 2.0 introduced support for beans written in languages other
than Java, with the currently supported dynamic languages being JRuby, than Java, with the currently supported dynamic languages being JRuby,
Groovy and BeanShell. This dynamic language support is comprehensively Groovy and BeanShell. This dynamic language support is comprehensively
detailed in the section entitled <xref linkend="dynamic-language"/>.</para> detailed in <xref linkend="dynamic-language"/>.</para>
<para>Spring 2.5 refines the dynamic languages support with autowiring <para>Spring 2.5 refines the dynamic languages support with autowiring
and support for the recently released JRuby 1.0.</para> and support for the recently released JRuby 1.0.</para>
@ -486,9 +482,8 @@
<title>Task scheduling</title> <title>Task scheduling</title>
<para>Spring 2.0 offers an abstraction around the scheduling of tasks. <para>Spring 2.0 offers an abstraction around the scheduling of tasks.
For the interested developer, the section entitled <xref For the interested developer, <xref linkend="scheduling-task-executor"/>
linkend="scheduling-task-executor"/> contains all of the contains all of the details.</para>
details.</para>
<para>The <interfacename>TaskExecutor</interfacename> abstraction is used <para>The <interfacename>TaskExecutor</interfacename> abstraction is used
throughout the framework itself as well, e.g. for the asynchronous JMS support. throughout the framework itself as well, e.g. for the asynchronous JMS support.

15
spring-framework-reference/src/new-in-3.xml

@ -306,6 +306,10 @@ public class RewardsTestDatabase {
<para>@Bean</para> <para>@Bean</para>
</listitem> </listitem>
<listitem>
<para>@DependsOn</para>
</listitem>
<listitem> <listitem>
<para>@Primary</para> <para>@Primary</para>
</listitem> </listitem>
@ -324,8 +328,10 @@ public class RewardsTestDatabase {
</itemizedlist></para> </itemizedlist></para>
<para>Here is an example of a Java class providing basic configuration <para>Here is an example of a Java class providing basic configuration
using the new JavaConfig features: <programlisting language="java">@Configuration using the new JavaConfig features: <programlisting language="java">package org.example.config;
public class AppConfig{
@Configuration
public class AppConfig {
private @Value("#{jdbcProperties.url}") String jdbcUrl; private @Value("#{jdbcProperties.url}") String jdbcUrl;
private @Value("#{jdbcProperties.username}") String username; private @Value("#{jdbcProperties.username}") String username;
private @Value("#{jdbcProperties.password}") String password; private @Value("#{jdbcProperties.password}") String password;
@ -357,8 +363,9 @@ public class AppConfig{
} }
</programlisting> To get this to work you need to add the following component </programlisting> To get this to work you need to add the following component
scanning entry in your minimal application context XML file. scanning entry in your minimal application context XML file.
<programlisting language="java">&lt;context:component-scan <programlisting language="xml">&lt;context:component-scan base-package="org.example.config"/&gt;
base-package="com.myco.config"/&gt;</programlisting></para> &lt;util:properties id="jdbcProperties" location="classpath:org/example/config/jdbc.properties"/&gt;
</programlisting></para>
</section> </section>
<section> <section>

8
spring-framework-reference/src/portlet.xml

@ -116,7 +116,7 @@
normal and global). This is not a specific feature of Spring Portlet MVC normal and global). This is not a specific feature of Spring Portlet MVC
itself, but rather of the <interfacename>WebApplicationContext</interfacename> itself, but rather of the <interfacename>WebApplicationContext</interfacename>
container(s) that Spring Portlet MVC uses. These bean scopes are described container(s) that Spring Portlet MVC uses. These bean scopes are described
in detail in the section entitled <xref linkend="beans-factory-scopes-other"/></para> in detail in <xref linkend="beans-factory-scopes-other"/></para>
</section> </section>
<note> <note>
@ -921,8 +921,8 @@ public class SampleController extends AbstractController {
the view technologies from Spring Web MVC. This includes not only the the view technologies from Spring Web MVC. This includes not only the
various <interfacename>View</interfacename> implementations themselves, various <interfacename>View</interfacename> implementations themselves,
but also the <interfacename>ViewResolver</interfacename> implementations. but also the <interfacename>ViewResolver</interfacename> implementations.
For more information, refer to the sections entitled For more information, refer to <xref linkend="view"/> and
<xref linkend="view"/> and <xref linkend="mvc-viewresolver"/> respectively.</para> <xref linkend="mvc-viewresolver"/> respectively.</para>
<para>A few items on using the existing <interfacename>View</interfacename> and <para>A few items on using the existing <interfacename>View</interfacename> and
<interfacename>ViewResolver</interfacename> implementations are worth mentioning:</para> <interfacename>ViewResolver</interfacename> implementations are worth mentioning:</para>
@ -1798,4 +1798,4 @@ public class MyFormController {
of your portlets.</para> of your portlets.</para>
</section> </section>
</chapter> </chapter>

14
spring-framework-reference/src/resources.xml

@ -329,8 +329,8 @@
<entry><para> Loaded as a <classname>URL</classname>, from the <entry><para> Loaded as a <classname>URL</classname>, from the
filesystem. <footnote> filesystem. <footnote>
<para>But see also the section entitled <xref <para>But see also
linkend="resources-filesystemresource-caveats" />.</para> <xref linkend="resources-filesystemresource-caveats" />.</para>
</footnote> </para></entry> </footnote> </para></entry>
</row> </row>
@ -394,9 +394,9 @@
<interfacename>ResourceLoader</interfacename> as an alternative to <interfacename>ResourceLoader</interfacename> as an alternative to
implementing the <interfacename>ResourceLoaderAware</interfacename> interface. implementing the <interfacename>ResourceLoaderAware</interfacename> interface.
The "traditional" <literal>constructor</literal> and <literal>byType</literal> The "traditional" <literal>constructor</literal> and <literal>byType</literal>
autowiring modes (as described in the section entitled autowiring modes (as described in <xref linkend="beans-factory-autowire"/>)
<xref linkend="beans-factory-autowire"/>) are now capable of providing a are now capable of providing a dependency of type
dependency of type <interfacename>ResourceLoader</interfacename> for either a <interfacename>ResourceLoader</interfacename> for either a
constructor argument or setter method parameter respectively. For more flexibility constructor argument or setter method parameter respectively. For more flexibility
(including the ability to autowire fields and multiple parameter methods), consider (including the ability to autowire fields and multiple parameter methods), consider
using the new annotation-based autowiring features. In that case, the using the new annotation-based autowiring features. In that case, the
@ -405,7 +405,7 @@
<interfacename>ResourceLoader</interfacename> type as long as the field, <interfacename>ResourceLoader</interfacename> type as long as the field,
constructor, or method in question carries the constructor, or method in question carries the
<interfacename>@Autowired</interfacename> annotation. For more information, <interfacename>@Autowired</interfacename> annotation. For more information,
see the section entitled <xref linkend="beans-autowired-annotation"/>.</para> see <xref linkend="beans-autowired-annotation"/>.</para>
</section> </section>
<section id="resources-as-dependencies"> <section id="resources-as-dependencies">
@ -739,4 +739,4 @@ ApplicationContext ctx =
new FileSystemXmlApplicationContext("file:/conf/context.xml");]]></programlisting> new FileSystemXmlApplicationContext("file:/conf/context.xml");]]></programlisting>
</section> </section>
</section> </section>
</chapter> </chapter>

3
spring-framework-reference/src/view.xml

@ -1669,8 +1669,7 @@ New York</programlisting>
<para>This example is a trivial Spring application that creates a list <para>This example is a trivial Spring application that creates a list
of words in the <interfacename>Controller</interfacename> and adds them of words in the <interfacename>Controller</interfacename> and adds them
to the model map. The map is returned along with the view name of our to the model map. The map is returned along with the view name of our
XSLT view. See the section entitled <xref linkend="mvc-controller" /> XSLT view. See <xref linkend="mvc-controller" /> for details of Spring Web MVC's
for details of Spring Web MVC's
<interfacename>Controller</interfacename> interface. The XSLT view will <interfacename>Controller</interfacename> interface. The XSLT view will
turn the list of words into a simple XML document ready for turn the list of words into a simple XML document ready for
transformation.</para> transformation.</para>

4
spring-framework-reference/src/web-integration.xml

@ -51,8 +51,8 @@
to use Struts for the presentation layer of your web application, the to use Struts for the presentation layer of your web application, the
assumption is that you are already familiar with Struts. If you need assumption is that you are already familiar with Struts. If you need
further details about any of the supported web frameworks themselves, further details about any of the supported web frameworks themselves,
please do consult the section entitled <xref please do consult <xref linkend="web-integration-resources" /> at the end
linkend="web-integration-resources" /> at the end of this chapter. of this chapter.
</emphasis></para> </emphasis></para>
</section> </section>

16
spring-framework-reference/src/xsd-configuration.xml

@ -364,7 +364,7 @@ public class Client {
<interfacename>List</interfacename> implementation will be chosen by the container.</para> <interfacename>List</interfacename> implementation will be chosen by the container.</para>
<para>Finally, you can also control the merging behavior using the <para>Finally, you can also control the merging behavior using the
<literal>'merge'</literal> attribute of the <literal>&lt;util:list/&gt;</literal> <literal>'merge'</literal> attribute of the <literal>&lt;util:list/&gt;</literal>
element; collection merging is described in more detail in the section entitled element; collection merging is described in more detail in
<xref linkend="beans-collection-elements-merging"/>.</para> <xref linkend="beans-collection-elements-merging"/>.</para>
</section> </section>
<section id="xsd-config-body-schemas-util-map"> <section id="xsd-config-body-schemas-util-map">
@ -409,7 +409,7 @@ public class Client {
<interfacename>Map</interfacename> implementation will be chosen by the container.</para> <interfacename>Map</interfacename> implementation will be chosen by the container.</para>
<para>Finally, you can also control the merging behavior using the <para>Finally, you can also control the merging behavior using the
<literal>'merge'</literal> attribute of the <literal>&lt;util:map/&gt;</literal> <literal>'merge'</literal> attribute of the <literal>&lt;util:map/&gt;</literal>
element; collection merging is described in more detail in the section entitled element; collection merging is described in more detail in
<xref linkend="beans-collection-elements-merging"/>.</para> <xref linkend="beans-collection-elements-merging"/>.</para>
</section> </section>
<section id="xsd-config-body-schemas-util-set"> <section id="xsd-config-body-schemas-util-set">
@ -454,7 +454,7 @@ public class Client {
<interfacename>Set</interfacename> implementation will be chosen by the container.</para> <interfacename>Set</interfacename> implementation will be chosen by the container.</para>
<para>Finally, you can also control the merging behavior using the <para>Finally, you can also control the merging behavior using the
<literal>'merge'</literal> attribute of the <literal>&lt;util:set/&gt;</literal> <literal>'merge'</literal> attribute of the <literal>&lt;util:set/&gt;</literal>
element; collection merging is described in more detail in the section entitled element; collection merging is described in more detail in
<xref linkend="beans-collection-elements-merging"/>.</para> <xref linkend="beans-collection-elements-merging"/>.</para>
</section> </section>
</section> </section>
@ -776,19 +776,19 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
</section> </section>
<section id="xsd-config-body-schemas-context-component-scan"> <section id="xsd-config-body-schemas-context-component-scan">
<title><literal>&lt;component-scan/&gt;</literal></title> <title><literal>&lt;component-scan/&gt;</literal></title>
<para>This element is detailed in the section entitled <xref linkend="beans-annotation-config"/>.</para> <para>This element is detailed in <xref linkend="beans-annotation-config"/>.</para>
</section> </section>
<section id="xsd-config-body-schemas-context-ltw"> <section id="xsd-config-body-schemas-context-ltw">
<title><literal>&lt;load-time-weaver/&gt;</literal></title> <title><literal>&lt;load-time-weaver/&gt;</literal></title>
<para>This element is detailed in the section entitled <xref linkend="aop-aj-ltw"/>.</para> <para>This element is detailed in <xref linkend="aop-aj-ltw"/>.</para>
</section> </section>
<section id="xsd-config-body-schemas-context-sc"> <section id="xsd-config-body-schemas-context-sc">
<title><literal>&lt;spring-configured/&gt;</literal></title> <title><literal>&lt;spring-configured/&gt;</literal></title>
<para>This element is detailed in the section entitled <xref linkend="aop-atconfigurable"/>.</para> <para>This element is detailed in <xref linkend="aop-atconfigurable"/>.</para>
</section> </section>
<section id="xsd-config-body-schemas-context-mbe"> <section id="xsd-config-body-schemas-context-mbe">
<title><literal>&lt;mbean-export/&gt;</literal></title> <title><literal>&lt;mbean-export/&gt;</literal></title>
<para>This element is detailed in the section entitled <xref linkend="jmx-context-mbeanexport"/>.</para> <para>This element is detailed in <xref linkend="jmx-context-mbeanexport"/>.</para>
</section> </section>
</section> </section>
@ -811,7 +811,7 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
<para>Last but not least we have the tags in the <literal>beans</literal> schema. <para>Last but not least we have the tags in the <literal>beans</literal> schema.
These are the same tags that have been in Spring since the very dawn of the framework. These are the same tags that have been in Spring since the very dawn of the framework.
Examples of the various tags in the <literal>beans</literal> schema are not shown here Examples of the various tags in the <literal>beans</literal> schema are not shown here
because they are quite comprehensively covered in the section entitled <xref linkend="beans-factory-properties-detailed"/> because they are quite comprehensively covered in <xref linkend="beans-factory-properties-detailed"/>
(and indeed in that entire <link linkend="beans">chapter</link>).</para> (and indeed in that entire <link linkend="beans">chapter</link>).</para>
<para>One thing that is new to the beans tags themselves in Spring 2.0 is the idea <para>One thing that is new to the beans tags themselves in Spring 2.0 is the idea
of arbitrary bean metadata. In Spring 2.0 it is now possible to add zero or more of arbitrary bean metadata. In Spring 2.0 it is now possible to add zero or more

Loading…
Cancel
Save