revised scope inheritance: default scope is "" (empty String) now; consistent isPrototype checks
This commit is contained in:
@@ -260,15 +260,14 @@
|
||||
The scope of this bean: typically "singleton" (one shared instance,
|
||||
which will be returned by all calls to getBean with the given id), or
|
||||
"prototype" (independent instance resulting from each call to getBean).
|
||||
Default is "singleton".
|
||||
|
||||
By default, a bean will be a singleton, unless the bean has a parent
|
||||
bean definition in which case it will inherit the parent's scope.
|
||||
|
||||
Singletons are most commonly used, and are ideal for multi-threaded
|
||||
service objects. Further scopes, such as "request" or "session", might
|
||||
be supported by extended bean factories (e.g. in a web environment).
|
||||
|
||||
Note: This attribute will not be inherited by child bean definitions.
|
||||
Hence, it needs to be specified per concrete bean definition.
|
||||
|
||||
Inner bean definitions inherit the singleton status of their containing
|
||||
bean definition, unless explicitly specified: The inner bean will be a
|
||||
singleton if the containing bean is a singleton, and a prototype if
|
||||
|
||||
Reference in New Issue
Block a user