Or, can I bound a custom implementation of org.springframework.beans.factory.config.Scope
interface with a specific @Scope
-annotated annotation?
For example, I have customized a new scope type:
@javax.inject.Scope @Retention(RUNTIME)
@interface Conversation {}
class ConversationScope implements Scope { ... }
class ConversationScopeConfigurer extends BeanFactoryPostProcessor
{ beanFactory.registerScope("conversation", new ConversationScope()); }
Now I want to use it as,
@Component
@Conversation
class Topic { ... }
instead of,
@Component
@org.springframework.context.annotation.Scope("conversation")
class Topic { ... }
Is it possible?
Is there something like "AnnotationPostProcessor" in spring-context?
<context:annotation-driven/>
or<context:component-scan/>
, then it likely won't work at all. – Rigorous