Integrating with Spring
In this recipe we will see how to integrate Wicket with Spring's popular inversion of control container. We will explore how to enable injection of component classes as well as any Java object with dependencies that come from Spring's contexts. In order to demonstrate the necessary concepts, we are going to build a simple application that displays the current time:
The time will come from a bean managed by Spring, and we will see how to bring it into a Wicket page.
Let's begin by creating the necessary business beans and installing them into the Spring context.
Create the interface for our time service: