how to read spring beans definitions
I need to read the bean definitions from a Spring context file, practically reading what is inside the XML. I do not want to instantiate beans, I just want to read the content of the file.
While I can write a parser to do so, I imagine Spring already does this. What classes does it use (I am running around the XmlBeanDefinitionReader related classes but I am not sure how to use them)?
How can I load the XML into bean definitions using Spring's c开发者_StackOverflow社区lasses?
I am using Spring 2.0.
Thank you!
If you create an XmlBeanFactory you can then use the methods in the ListableBeanFactory interface to inspect available beans, and get a BeanDefintion object as necessary using getBeanDefinition(beanName)
精彩评论