3 ways to autowire multiple interface implementations in spring boot | @Qualifier,@Resource,@Primary

preview_player
Показать описание
#spring #springframework #springboot #autowiring #resource #primary #qualifier #dependencyinjection #java #javaprogramming #interview #interviewquestions #springboottutorial
Learn what happens when there are more than one implementation of an autowired interface reference in a class in spring boot and how to solve it in 3 different ways using @Primary, @Qualifier and @Resource annotations with a practical example.
This is a very commonly asked interview question in spring boot.
Рекомендации по теме
Комментарии
Автор

what if that interface has 100 implementation classes. Then do we need to add a qualifier for each of them?

priyankashaw