mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-26 17:09:05 +00:00
added warnings regarding accidental usage of @Configurable on a managed bean (SPR-7216)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3414 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
@@ -2959,6 +2959,16 @@ public class Account {
|
||||
|
||||
</bean></programlisting>
|
||||
|
||||
<note>
|
||||
<para>Do not activate <interfacename>@Configurable</interfacename>
|
||||
processing through the bean configurer aspect unless you really
|
||||
mean to rely on its semantics at runtime. In particular, make sure
|
||||
that you do not use <interfacename>@Configurable</interfacename>
|
||||
on bean classes which are registered as regular Spring beans with
|
||||
the container: You would get double initialization otherwise, once
|
||||
through the container and once through the aspect.</para>
|
||||
</note>
|
||||
|
||||
<section id="aop-configurable-testing">
|
||||
<title>Unit testing <interfacename>@Configurable</interfacename>
|
||||
objects</title>
|
||||
|
||||
Reference in New Issue
Block a user