How to programmatically define Spring beans
The Spring framework is well know both for its powerful architecture and its often barely tolerated XML configuration syntax. So there are cases where you would like to take advantage of Spring features (Dependency Injection, scope management, AOP, Transaction Management) in a set of beans without having to declare all of them in XML. This is particularly the case where you need to define a non-trivial number of similar beans (e.g. DAOs, backing beans in a JSF application, etc.). This post explains how to use the BeanDefinitionRegistry interface to dynamically and programmatically add beans to an ApplicationContext.
Tags : frameworks how-to java server programming
You will be redirected to How to programmatically define Spring beans, in 20 seconds.
