Managing beans in an XML-based container
Frameworks become a popular because of the principle behind the architecture they built from. Each framework is built from different design patterns that manage the creation and behavior of the objects they manage. This recipe will detail how Spring 5.0 manages objects of the applications and how it shares a set of methods and functions across the platform.
Getting started
The two Maven projects previously created will be utilized to illustrate how Spring 5.0 loads objects into the heap. We will also be utilizing the ApplicationContext
rather than the BeanFactory
container in preparation for the next recipes involving more Spring components.
How to do it...
With ch02-xml
, let us demonstrate how Spring loads objects using the XML-based ApplicationContext
container:
- Create a package
org.packt.starter.ioc.model
, where our model classes will be placed. Our model classes will be typical Plain Old Java Objects (POJO), for which the Spring 5.0 architecture is...