0

How many types of containers are there in spring framework?

In Servlets, we know containers in any web or application server. likewise, where are Spring Framework containers?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
HashUser123
  • 57
  • 2
  • 6

2 Answers2

1

The heart of Spring (as far as DI is concerned) is the ApplicationContext. It is responsible for loading bean definitions and resolving dependencies. It will create all required beans and inject them accordingly (wire in Spring speak). It will also manage the lifecycle of the singleton beans. There can be more than one context and they can be hierarchical, such as in SpringMVC where the web context is aware of it's parent context (this is uni-directional).

Romski
  • 1,912
  • 1
  • 12
  • 27
0

There are two types of Containers for Spring.

  1. BeanFactory Container
  2. ApplicationContext Container

For detailed description please refer this

Kms
  • 1,082
  • 2
  • 11
  • 27