Instantiating multiple beans of the same class with Spring annotations
- by Francois
With an XML configured Spring bean factory, I can easily instantiate multiple instances of the same class with different parameters. How can I do the same with annotations? I would like something like this:
@Component(firstName=”joe”, lastName=”smith)
@Component(firstName=”mary”, lastName=”Williams”)
public class Person { /* blah blah */ }