For new projects, Java configuration is preferred over XML-basedconfiguration. In this post, we’re going to look at how to configure Spring withconfiguration in Java, instead of the traditional XML. For XML-based configuration, see a future blog post. The code You can find the code from this blog post onGitLab. Dependencies The only dependency you need to get a Spring container running isspring-context. Add in Maven: <dependency><groupId>org.springframework</groupId><artifactId>spring-conte...