How it works...

This project just imported three major Spring 5.0 libraries, Spring-Core, Spring-Beans, and Spring-Context, because the major classes and interfaces for creating the container are found in these libraries. This shows that Spring, unlike other frameworks, does not need the entire load of libraries just to set up the initial platform. Spring can be perceived as a huge enterprise framework nowadays but internally it is still lightweight.

The basic container that manages objects in Spring is provided by the org.springframework.beans.factory.BeanFactory interface and can only be found in the Spring-Beans module. Once additional features are needed such as message resource handling, AOP capabilities, application-specific contexts, and the listener implementation, the sub-interface of BeanFactory, namely the org.springframework.context.ApplicationContext interface, is then used. This ApplicationContext, found in Spring-Context modules, is the one that provides an enterprise-specific container for all its applications because it encompasses a larger scope of Spring components than its BeanFactory interface.

The container created, ch02-beans.xml, an ApplicationContext, is an XML-based configuration that contains XSD schemas from the three main libraries imported. These schemas have tag libraries and bean properties, which are essential in managing the whole framework. But beware of runtime errors once libraries are removed from the dependencies because using these tags is equivalent to using the APIs.

The final Spring Maven project directory structure should look like this:

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

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