Atos interview question

What is the importance of the annotation @Primary Can We Have Multiple Spring Configuration Files in One Project?

Interview Answer

Anonymous

27 Aug 2020

@Primary annotation is used to give higher preference to a bean, when there are multiple beans of same type. The @Primary annotation may be used on any class directly or indirectly annotated with @Component or on methods annotated with @Bean.