Skip to content

Commit f6228b9

Browse files
committed
Resolved SPR-6187: touch-ups based on mfisher's feedback.
1 parent f208988 commit f6228b9

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

spring-framework-reference/src/beans.xml

+19-19
Original file line numberDiff line numberDiff line change
@@ -3370,8 +3370,8 @@ beanFactory.registerScope("<emphasis role="bold">thread</emphasis>", threadScope
33703370
<para>Where existing bean classes already have callback methods that
33713371
are named at variance with the convention, you can override the
33723372
default by specifying (in XML, that is) the method name using the
3373-
init-method and destroy-method attributes on the &lt;bean/&gt;
3374-
itself.</para>
3373+
<literal>init-method</literal> and <literal>destroy-method</literal>
3374+
attributes of the &lt;bean/&gt; itself.</para>
33753375

33763376
<para>The Spring container guarantees that a configured initialization
33773377
callback is called immediately after a bean is supplied with all
@@ -5915,7 +5915,7 @@ public static void main(String[] args) {
59155915
tooling is still useful: it will be easy for the developer to get a type hierarchy
59165916
of <literal>RepositoryConfig</literal> implementations. In this way, navigating
59175917
<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>
59195919
</section>
59205920
</section>
59215921
</section>
@@ -6090,9 +6090,8 @@ jdbc.password=</programlisting>
60906090
to register a bean definition within an
60916091
<code>ApplicationContext</code> of the type specified as the method's
60926092
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:
60966095
<programlisting language="java">@Configuration
60976096
public class AppConfig {
60986097

@@ -6105,7 +6104,7 @@ public class AppConfig {
61056104

61066105
<para>The preceding configuration is exactly equivalent to the
61076106
following Spring XML: <programlisting language="xml">&lt;beans&gt;
6108-
&lt;bean name="transferService" class="com.acme.TransferServiceImpl"/&gt;
6107+
&lt;bean id="transferService" class="com.acme.TransferServiceImpl"/&gt;
61096108
&lt;/beans&gt; </programlisting></para>
61106109

61116110
<para>Both declarations make a bean named <code>transferService</code>
@@ -6142,12 +6141,13 @@ public class AppConfig {
61426141
<section id="beans-java-lifecycle-callbacks">
61436142
<title>Receiving lifecycle callbacks</title>
61446143

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
61516151
annotations</link> for further details.</para>
61526152

61536153
<para>The regular Spring <link
@@ -6169,7 +6169,7 @@ public class AppConfig {
61696169
<para>The <interfacename>@Bean</interfacename> annotation supports
61706170
specifying arbitrary initialization and destruction callback methods,
61716171
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>
61736173
element: <programlisting language="java">public class Foo {
61746174
public void init() {
61756175
// initialization logic
@@ -6316,7 +6316,7 @@ public CommandManager commandManager() {
63166316
// return new anonymous implementation of CommandManager with command() overridden
63176317
// to return a new prototype Command object
63186318
return new CommandManager() {
6319-
protected Command command() {
6319+
protected Command createCommand() {
63206320
return asyncCommand();
63216321
}
63226322
}
@@ -6327,8 +6327,8 @@ public CommandManager commandManager() {
63276327
<section id="beans-java-customizing-bean-naming">
63286328
<title>Customizing bean naming</title>
63296329

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
63326332
resulting bean. This functionality can be overridden, however, with
63336333
the <code>name</code> attribute. <programlisting language="java">@Configuration
63346334
public class AppConfig {
@@ -6345,8 +6345,8 @@ public class AppConfig {
63456345
<title>Bean aliasing</title>
63466346

63476347
<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
63506350
a String array for this purpose. <programlisting language="java">@Configuration
63516351
public class AppConfig {
63526352

0 commit comments

Comments
 (0)