Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 1.47 KB

File metadata and controls

27 lines (23 loc) · 1.47 KB

wicket-spring-hibernate

A dumb application based on the wicket archetype using wicket spring injection, spring transaction management, hibernate5, hibernate OGM.

configuration

  • 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 transaction manager
    • enables spring transaction management
  • 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

extra dependencies

  • wicket-spring
  • spring-web
  • spring-orm
  • hibernate-core
  • servlet-api
  • hibernate-ogm-infinispan (we pull in the ogm bom and use that to provide versions for hibernate deps)
  • narayana-jta

running it

mvn jetty:run will start it on port 8080