Skip to content
A demo project for Spring Boot in conjunction with GWT
Java Groovy HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs add intellij description Apr 10, 2018
gradle/wrapper update all dependencies Apr 10, 2018
src fix cors Apr 10, 2018
.gitignore Inital commit Dec 11, 2015
.travis.yml let travis decide which jdk to use Apr 10, 2018
CODE_OF_CONDUCT.md Create code of conduct Jul 19, 2017
LICENSE update licence Apr 10, 2018
Procfile Simplify PROCFILE Sep 21, 2016
README.md download gwt dependencies manually Apr 10, 2018
app.json Fix typo Sep 21, 2016
build.gradle typo Apr 10, 2018
gradlew update all dependencies Apr 10, 2018
gradlew.bat Update gradle and adapt integration tests to spock 1.1 Jul 19, 2017

README.md

Spring Boot GWT

Build Status License

Deploy

This is a demo project to show Spring Boot in conjunction with GWT. It uses the latest dependencies (Spring Boot 2.0.1 and GWT 2.8.2) and Java 8. The deployed app can be found here.

Run

To run this project you have to start Spring Boot and GWT separate. If you use IntelliJ, see the IDEA Settings readme for the correct configuration.

Spring Boot can also be started with gradle.

gradlew bootRun

Test

Currently only the server side code is tested. To run the tests use the following command

gradlew test

We use Spock as testing framework because of the great readability, syntax and built in features.

Outdated dependencies

To check for outdated dependencies

gradlew dependencyUpdates -Drevision=release

Build

The project con be build to a single jar file with an embedded tomcat:

gradlew clean build

After gradle build the project the finished jar file is in build/libs/spring-boot-gwt-1.0.0.jar and can simply be started with

java -jar build/libs/spring-boot-gwt-1.0.0.jar

Heroku

To deploy this app to heroku use the Deploy to Heroku Button on the top.

Heroku uses the gradle stage task to build the project. Because Spring Boot puts everything we need into the jar file we only have to tell heroku to execute this jar file.

Technical Details

Architecture

The client side and server side are strictly separated. The GWT files are in the client package (except the .gwt.xml) and the server side code is in the server package. All static client code like the index.html and css files are inside the static folder. Gradle will also put the compiled sources in this folder.

The communication is made via JSON for which reason we have make 2 implementations of the object we send (POJO in the frontend and POJO with javax annotations in the backend).

You can’t perform that action at this time.