What are the types of IOC containers in Spring ?




In spring we have two IOC containers and one Web Container is in Spring MVC:

1.       Core container   (BeanFactory)

2.       J2EE container    (ApplicationContext/ConfigurableApplicationContext)

3.    Web Container

This web container is prepared on top of IOC container.
IOC types Hierarchy


What container will do ? 

Below are few tasks of containers :
  1. read xml files (web.xml)

  2. create instances of xml beans classes/servlet...POJO

  3. manage lifecycle of bean classes/servlet...POJO

  4. it will supply dynamic parameters to bean classes/servlet..POJO as eg. init param and context param in servlet  ;)


Note: XMLs are used to give input to POJO classes and Associated references to make our layers loosely coupled.

Dependency Injection (DI) is the main asset of the IOC container.

This web container is prepared on top of IOC container.

No comments:

Post a Comment

Fixing yum command on linux

You may find yourself having to fix more packages. So you can just remove everything you had installed via  pip and reinstall everythin...