Hi, Iam new to Spring, and i have a requirement of instantiating the bean based on its type.
Code:Configuration AnnotationDrivenConfig public class A { Bean public Art<VoiceMail> getVoiceMailRepository() { return new Apple() ; } Bean public Art<Text> getTextRepository() { return new Text() ; } } And i get the bean in another class using the following code snippet. import org.springframework.beans.factory.annotation.Autowired; Autowired Art<Text> text; //But i can't instantiate two beans of same type Art.Please let me know the resolution.


