A Flavours project template for Java/Spring Boot
git clone git@github.com:flavours/getting-started-with-spring-boot.git
cd getting-started-with-spring-boot
docker-compose build
The project includes a web
service, running the Java code, and a db
service, running a Postgres database.
See the docker-compose.yml
file for details.
docker-compose up
Containers for both services will be launched. The project can be reached at http://localhost:8000.
Hot-reloading is enabled (i.e. changes to the Java code in the project will cause the application to restart so that they can be used.)
The container runs a Tomcat server listening on port 8080. The docker-compose.yml
file is set up to
expose this port to the Docker host at port 8000, but you are free to change it as you wish - edit the ports
directive:
services:
web:
[...]
ports:
- 8000:8080
See the contribution guide.
To create a new release of the getting started project, you have to updated the default welcome screen with the latest version.
docker run --rm --volume "`pwd`:/data" --user `id -u`:`id -g` pandoc/core:2.9.2 -s --css https://utils.flavours.dev/baseproject/1.0/style.css -o /data/src/main/resources/templates/index.html /data/README.md
Please also update the changelog accordingly and tag a new release in github.
- Handling Form Submission
- Accessing Relational Data using JDBC with Spring
- Managing Transactions
- Accessing data with MySQL
- Accessing Data with JPA
- Securing a Web Application
- Spring Boot and OAuth2
- Authenticating a User with LDAP
- Building a RESTful Web Service
- Serving Web Content with Spring MVC
- Building REST services with Spring
This project template uses:
- Java 11
- FlywayDB for database migrations
- Gradle to build and, in dev-mode, run the application with hot reload
- Spring JPA for database access
- Spring Web to serve HTTP requests
- Thymeleaf for HTML-templating