@@ -3370,8 +3370,8 @@ beanFactory.registerScope("<emphasis role="bold">thread</emphasis>", threadScope
3370
3370
<para >Where existing bean classes already have callback methods that
3371
3371
are named at variance with the convention, you can override the
3372
3372
default by specifying (in XML, that is) the method name using the
3373
- init-method and destroy-method attributes on the < bean/ >
3374
- itself.</para >
3373
+ < literal > init-method</ literal > and < literal > destroy-method</ literal >
3374
+ attributes of the < bean/ > itself.</para >
3375
3375
3376
3376
<para >The Spring container guarantees that a configured initialization
3377
3377
callback is called immediately after a bean is supplied with all
@@ -5915,7 +5915,7 @@ public static void main(String[] args) {
5915
5915
tooling is still useful: it will be easy for the developer to get a type hierarchy
5916
5916
of <literal >RepositoryConfig</literal > implementations. In this way, navigating
5917
5917
<literal >@Configuration</literal > classes and their dependencies becomes no
5918
- different that the usual process of navigating interface-based code.</para >
5918
+ different than the usual process of navigating interface-based code.</para >
5919
5919
</section >
5920
5920
</section >
5921
5921
</section >
@@ -6090,9 +6090,8 @@ jdbc.password=</programlisting>
6090
6090
to register a bean definition within an
6091
6091
<code >ApplicationContext</code > of the type specified as the method's
6092
6092
return value. By default, the bean name will be the same as the method
6093
- name. (See <link linkend =" bean-naming" > bean naming</link > for details
6094
- on how to customize this behavior.) The following is a simple example
6095
- of a <interfacename >@Bean</interfacename > method declaration:
6093
+ name. The following is a simple example of a
6094
+ <interfacename >@Bean</interfacename > method declaration:
6096
6095
<programlisting language =" java" >@Configuration
6097
6096
public class AppConfig {
6098
6097
@@ -6105,7 +6104,7 @@ public class AppConfig {
6105
6104
6106
6105
<para >The preceding configuration is exactly equivalent to the
6107
6106
following Spring XML: <programlisting language =" xml" >< beans>
6108
- < bean name ="transferService" class="com.acme.TransferServiceImpl"/>
6107
+ < bean id ="transferService" class="com.acme.TransferServiceImpl"/>
6109
6108
< /beans> </programlisting ></para >
6110
6109
6111
6110
<para >Both declarations make a bean named <code >transferService</code >
@@ -6142,12 +6141,13 @@ public class AppConfig {
6142
6141
<section id =" beans-java-lifecycle-callbacks" >
6143
6142
<title >Receiving lifecycle callbacks</title >
6144
6143
6145
- <para >Beans created in a
6146
- <interfacename >@Configuration</interfacename >-annotated class supports
6147
- the regular lifecycle callbacks. Any classes defined with the @Bean
6148
- annotation can use the @PostConstruct and @PreDestroy annotations from
6149
- JSR-250, see <link
6150
- linkend =" beans-factory-lifecycle-combined-effects" >JSR-250
6144
+ <para >Beans declared in a
6145
+ <interfacename >@Configuration</interfacename >-annotated class support
6146
+ the regular lifecycle callbacks. Any classes defined with the
6147
+ <literal >@Bean</literal > annotation can use the
6148
+ <literal >@PostConstruct</literal > and <literal >@PreDestroy</literal >
6149
+ annotations from JSR-250, see <link
6150
+ linkend =" beans-postconstruct-and-predestroy-annotations" >JSR-250
6151
6151
annotations</link > for further details.</para >
6152
6152
6153
6153
<para >The regular Spring <link
@@ -6169,7 +6169,7 @@ public class AppConfig {
6169
6169
<para >The <interfacename >@Bean</interfacename > annotation supports
6170
6170
specifying arbitrary initialization and destruction callback methods,
6171
6171
much like Spring XML's <code >init-method</code > and
6172
- <code >destroy-method</code > attributes to the <code >bean</code >
6172
+ <code >destroy-method</code > attributes on the <code >bean</code >
6173
6173
element: <programlisting language =" java" >public class Foo {
6174
6174
public void init() {
6175
6175
// initialization logic
@@ -6316,7 +6316,7 @@ public CommandManager commandManager() {
6316
6316
// return new anonymous implementation of CommandManager with command() overridden
6317
6317
// to return a new prototype Command object
6318
6318
return new CommandManager() {
6319
- protected Command command () {
6319
+ protected Command createCommand () {
6320
6320
return asyncCommand();
6321
6321
}
6322
6322
}
@@ -6327,8 +6327,8 @@ public CommandManager commandManager() {
6327
6327
<section id =" beans-java-customizing-bean-naming" >
6328
6328
<title >Customizing bean naming</title >
6329
6329
6330
- <para >By default, Configuration classes use a
6331
- <interfacename >@Bean</interfacename > methods name as the name of the
6330
+ <para >By default, configuration classes use a
6331
+ <interfacename >@Bean</interfacename > method's name as the name of the
6332
6332
resulting bean. This functionality can be overridden, however, with
6333
6333
the <code >name</code > attribute. <programlisting language =" java" >@Configuration
6334
6334
public class AppConfig {
@@ -6345,8 +6345,8 @@ public class AppConfig {
6345
6345
<title >Bean aliasing</title >
6346
6346
6347
6347
<para >As discussed in <xref linkend =" beans-beanname" />, it is sometimes desirable
6348
- to name a bean multiple names, otherwise known as <emphasis >bean aliasing</emphasis >.
6349
- The <literal >name</literal > attribute to the <literal >@Bean</literal > annotation accepts
6348
+ to give a single bean multiple names, otherwise known as <emphasis >bean aliasing</emphasis >.
6349
+ The <literal >name</literal > attribute of the <literal >@Bean</literal > annotation accepts
6350
6350
a String array for this purpose. <programlisting language =" java" >@Configuration
6351
6351
public class AppConfig {
6352
6352
0 commit comments