Another option for implementing the Spring 5.0 container is through the use of Spring JavaConfig. This is a technique that uses pure Java classes in configuring the framework's container. This solution eliminates the use of bulky and tedious XML metadata and also provides a type-safe and refactoring-free approach in configuring entities or collections of objects into the container. This recipe will showcase how to create the container using JavaConfig in a web.xml-less approach.
Implementing a Spring container using JavaConfig
Getting started
Create another Maven project using the methodology in Chapter 1, Getting Started with Spring, and name the project ch02-xml. This STS Eclipse project will be using a Java class approach...