A REST-oriented micro-service or application. You can choose to add a W20 UI during generation.

The result is a single-JAR capsule embedding the Undertow Web server. If you select the W20 UI option during generation, it also includes the W20 bridge add-on which automatically manages the W20 frontend.

Creation

You need to have Apache Maven 3.1+ installed. To create a Java Web application project from scratch, execute the following command:

mvn -U org.seedstack:seedstack-maven-plugin:generate -Dtype=web

This will invoke the generate goal of the SeedStack maven plugin generate goal which will:

The process is interactive and will ask you a few questions about the project to be created.

Result

After execution, a single module project is created:

- myservice
    |- src
        |- main
        |   |- docker                         <-- docker file if any
        |   |- java
        |   |   |- org.generated.project
        |   |       |- application            <-- application logic
        |   |       |- domain
        |   |       |   |- model              <-- domain model
        |   |       |   |- services           <-- domain services
        |   |       |   |- shared             <-- shared value objects
        |   |       |- infrastructure         <-- technical infrastructure
        |   |       |- interfaces       
        |   |           |- rest               <-- REST resources and representations
        |   |- resources
        |       |- application.yaml           <-- main configuration
        |       |- META-INF
        |           |- [resources]            <-- frontend static resources if any
        |- test
            |- java
            |- resources
                |- application.override.yaml  <-- test configuration

Note that you can choose to remove the domain packages and put the domain in a separate domain module.

Conversion to WAR

This project is designed to be run from the command-line with its embedded Web server. To convert it to a classic WAR, see this guide.

More resources