Summary

DI or IoC is the key feature of Spring. It makes code loosely coupled and testable. Understanding DI is the key to making the best use of the Spring Framework.

In this chapter, we looked at a few examples to understand what a dependency is. We understood the need for DI and explored implementing DI with the Spring Framework. We understood the basics of ApplicationContext, the BeanFactory, component scans, and bean scopes. We discussed creating application contexts with Java and XML configuration.

We wrote a few great unit tests to see the loose coupling the Spring Framework provides.

We explored the Spring Framework support for Java Contexts and Dependency Injection (CDI).

In the next chapter, let's start building a web application with the Spring Framework. We will use the Spring MVC Module, which makes developing great web applications easy.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset