Spring Service Scaffold
A scaffold for a web service operating with a Spring Framework backend, reactjs as frontend and a continuous testing and building pipeline, built on gradle, junit5 and GitHub actions.
Components
Backend
This repository builds a Java 17 application serving a webapp and web service using the Spring Framework on Reactive Stack. See ApiController class for the implementation of a controller.
Frontend
A reactjs application created with the create-react-app script.
Continuous Building/Testing
Besides JUnit 5, this scaffold employs the following tools for building and testing:
- Gradle plugin for the OWASP dependency check, to spot vulnerabilities in the JARs dependencies.
- Gradle plugin for Checkstyle to verify code formatting.
- Gradle JIB plugin for building a docker image out of the JAR.
- Dependabot to update outdated gradle dependencies.
- Spring Boot Integration for Sentry.
TODOs
After forking the repository to build your new web services, complete the following TODOs:
- Rename the project in the following locations:
- settings.gradle.tks, property
rootProject.name
- application.yml, property
spring.application.name
- package.json, property
name
- settings.gradle.tks, property
- Change the version of the project in:
- build.gradle.tks, property
version
- package.json, property
version
- build.gradle.tks, property
- Rename the package from
org.example
to your organisation/application name scheme. - Rename the group name in build.gradle.tks to the package name.
- Set the sentry DSN of your project in application.yml