Fixed @Configurable documentation with respect to the use of a prototype-scoped bean definition.
Issue: SPR-10298
This commit is contained in:
parent
ff15534211
commit
8987ceea93
|
@ -2847,8 +2847,8 @@ public class Account {
|
||||||
|
|
||||||
<para>When used as a marker interface in this way, Spring will configure
|
<para>When used as a marker interface in this way, Spring will configure
|
||||||
new instances of the annotated type (<classname>Account</classname> in
|
new instances of the annotated type (<classname>Account</classname> in
|
||||||
this case) using a prototype-scoped bean definition with the same name
|
this case) using a bean definition (typically prototype-scoped) with the
|
||||||
as the fully-qualified type name
|
same name as the fully-qualified type name
|
||||||
(<classname>com.xyz.myapp.domain.Account</classname>). Since the default
|
(<classname>com.xyz.myapp.domain.Account</classname>). Since the default
|
||||||
name for a bean is the fully-qualified name of its type, a convenient
|
name for a bean is the fully-qualified name of its type, a convenient
|
||||||
way to declare the prototype definition is simply to omit the
|
way to declare the prototype definition is simply to omit the
|
||||||
|
@ -2875,7 +2875,7 @@ public class Account {
|
||||||
new <classname>Account</classname> instances.</para>
|
new <classname>Account</classname> instances.</para>
|
||||||
|
|
||||||
<para>You can also use autowiring to avoid having to specify a
|
<para>You can also use autowiring to avoid having to specify a
|
||||||
prototype-scoped bean definition at all. To have Spring apply autowiring
|
dedicated bean definition at all. To have Spring apply autowiring
|
||||||
use the '<literal>autowire</literal>' property of the
|
use the '<literal>autowire</literal>' property of the
|
||||||
<interfacename>@Configurable</interfacename> annotation: specify either
|
<interfacename>@Configurable</interfacename> annotation: specify either
|
||||||
<literal>@Configurable(autowire=Autowire.BY_TYPE)</literal> or
|
<literal>@Configurable(autowire=Autowire.BY_TYPE)</literal> or
|
||||||
|
|
Loading…
Reference in New Issue