Friday, July 19, 2019

Spring IOC

What are the 2 types of Spring IOC containers?
  • Bean Factory
  • Application Context
What is the difference between bean factory and application context?
  • The spring framework comes with two IOC containers, bean factory and application context.
  • Bean factory is the most basic version of IOC container, and the application context extends the bean factory.
  • The application context comes with Advance features, including several that a gear towards enterprise applications while the bean factory comes with only basic features. Therefore, it is generally recommended to use application context and we should use bean factory only when memory consumption is critical.
  • Application context is an interface we can use its Implementation for creating objects in spring.
  • We can configure beans using XML,annotation and Java configuration file.

No comments:

Post a Comment

Spring Boot

What is circular/cyclic dependency in spring boot? When two services are interdependent on each other, that is to start one service, we requ...