Donate : Link
Medium Blog : Link
Applications : Link
Spring Tutorial Index Page: Link
* In IOC we have 3 container. These 3 are interfaces.
1. Core (BeanFactory (I) -> XmlBeanFactory (C))
- BeanFactory b = new XmlBeanFactory();
- ApplicationContext a = new ClasspathXmlApplicationContext();
- ConfigurableApplicationContext = new ClasspathXmlApplicationContext(“”);
3. Web (WebApplicationContext (I) -> WebApplicationContextUtil (Factory Class)) (It is in Spring MVC)
- WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
* What Container do?
- Read xml file
- Create instances for pojo classes
- Manage lifecycle of pojo classes
- Into pojo classes we can do DI
- IOC internally use SAX parser.
- While loading it will check xml (Ex. spring.xml) document. If it will find any invalid tag or unformed tag (tag opened but not closed) then this parser will throw parsing exception.
- * IOC create instance in JVM on first user request (BeanFactory) or while loading (ApplicationContext) when scope is singleton. If scope is not singleton then ApplicationContext not create objects on loading.

