Spring - Core Flashcards
(16 cards)
What are the main features and benefits of the Spring Framework?
What is Inversion of Control (IoC) and how does Spring implement it?
What is Dependency Injection (DI) and what are the types supported by Spring?
What is the difference between constructor injection and setter injection in Spring?
What are Spring Beans? How are they defined and managed in the Spring container?
What is the Bean lifecycle in Spring?
What are the different scopes of Spring Beans?
What is the difference between @Component, @Repository, @Service, and @Controller?
What is the role of the ApplicationContext in Spring? How is it different from BeanFactory?
What is the use of @Qualifier in Spring?
How is @Value used in Spring for injecting values?
What is the difference between @Bean and @Component?
What are Spring Profiles? How are they configured and used?
What is the purpose of the @PostConstruct and @PreDestroy annotations?
How can you create a thread-safe singleton bean in Spring?
Explain how Spring achieves lazy initialization and how it differs from eager initialization.