Announcement Announcement Module
Collapse
No announcement yet.
Programmatic retrieval of beans via @Qualifier Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Programmatic retrieval of beans via @Qualifier

    Is there a way to programmatically retrieve a bean via a qualifier?

  • #2
    You can use ApplicationContext.getBeansWithAnnotation() if you have several beans of the same type which differ in their qualifier annotations.

    Comment


    • #3
      That's interesting, as is this thread: http://forum.springsource.org/showthread.php?t=78141.

      Still, I'm probably going to stick with my map of type->beanNames hack for now. It's probably more performant and less code.

      Comment

      Working...
      X