MicroSpring |
| Home |
So, if you have a class which uses a datasource, it does not do a lookup through a singleton to locate the datasource. Instead it has a member variable called dataSource (say), and a setter called setDataSource(..). You then set up an xml config file which gives the bean an id, and specify its implementation class, and the fact that it has a property which should be set with another bean called datasource.
Understand? If not, look at the example on the spring documentation page, or micro guide.