A dumb application based on the wicket archetype using wicket spring injection, spring transaction management, hibernate5, jpa entity manager.
- SpringListener: a web listener configured to create a spring context using org.example.app.Context as it's configuration
- ExampleFilter: a web filter that extends wicket filter, configured to use org.example.app.WicketApplication as the application class
- Context:
- loads application.properties from the classpath as a property source
- creates entity manager factory and transaction manager
- enables spring transaction management
- enables jpa transaction processing using PersistenceAnnotationBeanPostProcessor
- WicketApplication: sets homepage and adds a component instantiation listener that can do spring injection into wicket components
- HomePage: uses SpringBean annotation to wire in bean from the spring context
- Service: @Transactional annotations on methods to open and close transactions on entry/exit
- persistence.xml: defines JPA persistence unit
- wicket-spring
- spring-web
- spring-orm
- hibernate-core
- servlet-api
- h2 (in memory database)
mvn jetty:run
will start it on port 8080