Question: > Spring Beans Suppose your class depends on a Student bean; however, there are two Student beans available with different names: Student1 and Student2 in

> Spring Beans

Suppose your class depends on a Student bean; however, there are two Student beans available with different names: Student1 and Student2 in the same package. Which annotation should be used along with the @Autowired annotation to guide the application to choose the bean named Student1? Choose the correct option from those given below.

1) @Configuration

2) @Component

3) @Qualifier

4) @Bean Provide the correct solution, Explain in brief why it is the right answer.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!