In the previous chapter, you saw how Spring creates beans in the container. You also learned how to configure the dependency injection pattern using XML, Java, and Annotation. In this chapter, we will go into more detail, beyond injecting beans and the configuration of dependencies in a Spring application. Here, you will explore the life and scope of beans in the container, and learn how the Spring container works on the defined Spring bean configuration with XML, Annotation, and Java. Spring allows us to control not only the various configurations for the DI pattern and dependency values that are to be injected into the object created from a particular bean definition, but also the life and scope of the beans created from a particular bean definition.
When I was writing this chapter, my two and a half year old son, Arnav, came...