java.lang.Object | |
↳ | org.springframework.context.annotation.Jsr330ScopeMetadataResolver |
Simple ScopeMetadataResolver
implementation that follows JSR-330 scoping rules:
defaulting to prototype scope unless javax.inject.Singleton is present.
This scope resolver can be used with ClassPathBeanDefinitionScanner
and
AnnotatedBeanDefinitionReader
for standard JSR-330 compliance. However,
in practice, you will typically use Spring's rich default scoping instead - or extend
this resolver with custom scoping annotations that point to extended Spring scopes.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Register an extended JSR-330 scope annotation, mapping it onto a
specific Spring scope by name.
| |||||||||||
Register an extended JSR-330 scope annotation, mapping it onto a
specific Spring scope by name.
| |||||||||||
Resolve the
ScopeMetadata appropriate to the supplied
bean definition . |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Resolve the given annotation type into a named Spring scope.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.context.annotation.ScopeMetadataResolver
|
Register an extended JSR-330 scope annotation, mapping it onto a specific Spring scope by name.
annotationType | the JSR-330 annotation type as a Class |
---|---|
scopeName | the Spring scope name |
Register an extended JSR-330 scope annotation, mapping it onto a specific Spring scope by name.
annotationType | the JSR-330 annotation type by name |
---|---|
scopeName | the Spring scope name |
Resolve the ScopeMetadata
appropriate to the supplied
bean definition
.
Implementations can of course use any strategy they like to
determine the scope metadata, but some implementations that spring
immediately to mind might be to use source level annotations
present on the class
of the
supplied definition
, or to use metadata present in the
attributeNames()
of the supplied definition
.
definition | the target bean definition |
---|
null
Resolve the given annotation type into a named Spring scope.
The default implementation simply checks against registered scopes. Can be overridden for custom mapping rules, e.g. naming conventions.
annotationType | the JSR-330 annotation type |
---|