Git Product home page Git Product logo

spring-boot-example-wicket's Introduction

Update: Now building a war archive containing a webapp directory.

spring-boot-example-wicket

This project builds and runs a minimal wicket web application.

Implemented:

  • fat war starting a tomcat server
  • wicket web application as spring boot starting point
  • using ServletContextInitializer instead of web.xml
  • spring wiring into wicket web pages
  • SpringBootServletInitializer used for optional deployment on application server

##Notable classes

###WicketWebApplication

The Wicket Web Application class is a spring bean triggering the spring boot configuration and start up by using the @EnableAutoConfiguration annotation and providing the main class.

###WebInitializer

This class replaces the web.xml by using spring boot's ServletContextInitializer that is found and executed automatically on startup.

It's code is equivalent to the following web.xml part:

<filter>
  <filter-name>wicket-filter</filter-name>
	<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
    <init-param>
        <param-name>applicationFactoryClassName</param-name>
        <param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value>
    </init-param>
    <init-param>
        <param-name>applicationBean</param-name>
        <param-value>wicketWebApplication</param-value>
    </init-param>
</filter>
 
<filter-mapping>
	<filter-name>wicket-filter</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>

###WarInitializer

This class is used when being deployed on an application server. In this scontext it has the functionality of the Application's main method.

Running / Deployment

Building the project provides two war archives. One is a fully featured spring boot runnable war, the other having the suffix original is a standard war archive ans can be deployed directly on an application server.

spring-boot-example-wicket's People

Contributors

pentadrago avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.