- Spring 5.0 Cookbook
- Sherwin John Calleja Tragura
- 79字
- 2021-07-08 10:16:13
Implementing a Spring container using JavaConfig
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.