#simple web app with spring boot
This project contains a simple web application demo, which is build with spring boot and some common spring components.
The project is based on:
Building Spring Boot Application
The spring demo application can be build with maven or gradle. To build the application as executable JAR use the maven goal:
The application can be started by:
java -jar target/simpleweb-springboot-*.jar
With Gradle the application can be build by the following Gradle command:
Now the application can be started by the following command
java -jar build/libs/simpleweb-springboot.jar
Hot Deployment with Spring loaded and JHipster
Since Spring Boot version 1.3.x spring loaded is not needed anymore. To hot reload the application Spring DevTools now can be used.
Spring Boot 1.3 DevTools includes an embedded LiveReload server, to get a browser plugin see here.
Run Spring Boot Sample
To start the web application invoke:
Open the URL http://localhost:8080 in a web browser. Login with the username "spring" and password "boot".
Import into Eclipse
The eclipse project configurations files can be build with gradle, invoke gradle:
Or invoke the maven goal:
Build Docker Image
To build the docker image with gradle invoke
./gradlew build buildDocker
With maven the docker image can be build by invoke the maven goal
mvn clean package docker:build
Tutorial how to crate a docker image for a spring boot application see here.