Spring | Autowiring Qualifier
Spring provides @Qualifier annotation to refer correct bean while doing autowiring.
Suppose we have interface IService which has two concrete implementation.
Suppose we have interface IService which has two concrete implementation.
When we try to Autowire IService object in any other class it will throw exception as there are two beans.
Spring Qualifier is used in such situation to place object of correct implementation class to autowired object.
Now, above iservice object will hold object of IServiceImplTwo class.
Nice
ReplyDelete