Lookup Groovy Beans in App Context
I have several Gro开发者_开发百科ovy beans defined within my app context file, like so:
<lang:groovy id="bean1">
...
</lang:groovy>
I would like to get a list of all the groovy beans from the ApplicationContext, but don't see a clean way to do this.
Is there a straightforward way to get a list of all the Groovy implemented beans?
I am using Spring 3.
applicationContext.getBeansForType(Class.forName("groovy.lang.GroovyObject"));
See ListableBeanFactory
Javadoc.
精彩评论