Skip to content

Convenient programmatic bean retrieval with qualifiers [SPR-8891] #13532

Closed
@spring-projects-issues

Description

@spring-projects-issues

Ilya Kazakevich opened SPR-8891 and commented

Because of http://stackoverflow.com/questions/8345723/java-spring-tagging-beans-in-xml-to-get-specific-bean-by-class-and-tag I need to find bean which is an instance of specific interface and has special qualifier.

Spring needs to have something like this: beanFactory.getBean(new NameCondition("someName"), new ClassCondition(MyInterface.class));
beanFactory.getBean(new QualifierCondition("myQualif"), new ClassCondition(MyInterface.class));
beanFactory.getBean(new ClassCondition(MyInterface.class));

getBean should be vararg method that accepts several conditions and joins them using "AND".


Issue Links:

1 votes, 10 watchers

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions