Question 1: CORE SPRING BOOT - Dependency Injection Concept
What is the main purpose of Dependency Injection (DI) in Spring Boot?
Question 2: CORE SPRING BOOT - Constructor Injection
Which of the following best describes constructor-based dependency injection?
Question 3: CORE SPRING BOOT - Setter Injection
Which of the following best describes setter-based dependency injection?
Question 4: CORE SPRING BOOT - Field Injection
What is a key drawback of field injection using @Autowired directly on fields?
Question 5: CORE SPRING BOOT - Constructor Injection Example
What will happen when this Spring Boot code runs?
Question 6: CORE SPRING BOOT - Setter Injection Example
In the following code, how is ServiceA injected into ServiceB?
Question 7: CORE SPRING BOOT - Field Injection Example
Identify the injection type in the following code:
Question 8: CORE SPRING BOOT - Benefits of Constructor Injection
Which of the following is a key advantage of constructor injection over setter or field injection?
Question 9: CORE SPRING BOOT - Optional Dependencies
How can you mark a dependency as optional in Spring Boot DI?
Question 10: CORE SPRING BOOT - Circular Dependency Handling
Which DI type is least prone to circular dependency issues in Spring Boot?