Which annotation is used to mark a class as a Spring Bean in the latest Spring Framework?
What is the primary purpose of Dependency Injection (DI) in Spring Framework?
Which of the following is NOT a valid Spring bean scope in Spring 5.x+?
What does @Autowired annotation do in Spring?
Which XML element is used to define a bean in Spring XML configuration?
Advertisement
A Spring application requires constructor-based dependency injection for a mandatory dependency. Which approach is best?
What is the default scope of a Spring Bean?
Which of the following best describes IoC (Inversion of Control) in Spring?
A developer needs to inject a bean only if it exists, otherwise skip injection. Which annotation should be used?
What is the role of ApplicationContext in Spring Framework?
Which annotation is used to define configuration classes in Spring that replace XML configuration?
Consider a scenario where multiple beans of the same type exist. How can you specify which bean to inject?
What is the difference between @Bean and @Component annotations?
A Spring Boot application starts with ClassPathXmlApplicationContext('application.xml'). What does this do?
Which Spring concept ensures that the same bean instance is reused throughout the application lifecycle?
An enterprise application needs different bean implementations based on environment (dev/prod). Which approach is most suitable?
What happens when a prototype-scoped bean has a dependency on a singleton-scoped bean in Spring?
In Spring Framework 2024-25, which feature allows lazy initialization of beans?
A microservices architecture uses Spring with circular dependency between ServiceA and ServiceB. What is the best solution?
In Spring Framework, what is the primary purpose of the @Autowired annotation?