The backend of this project is written in Spring Boot.
The database can be started via docker
- cd into the root directory of the project
cd docker- Run
docker compose up
Make sure to set up the DB first
You can start the backend via Terminal
- cd to the project root
cd backendmvn spring-boot:run -Dspring-boot.run.arguments="--spring.profiles.active=dev"
We use the spotless Plugin for formatting the Java code: https://github.com/diffplug/spotless
- To check the code formatting run
mvn spotless:check - To then format the code run
mvn spotless:apply
If you have not set up our Git Hooks we strongly encourage you to do so since they also contain a check for the formatting whenever you commit.
- Open
Go to Settings -> Editor -> Code styles -> Java - Select the default project config and export it to a file
- Then make the changes you want to the code style config. Make sure to
- HIT APPLY and then export it as a file
- Afterward run the following command
git --no-pager diff --no-index -U0 default.xml changed.xml | egrep '^\+' | diff-so-fancyto see the changes - Finally copy all additions to the formatter file in the backend project
We use the springdoc-openapi library for documenting the API.
Our API documentation is generated using springdoc-openapi. You can access it through a web interface (Swagger UI) or as a raw json file (OpenAPI 3 specification).
The CertificateType Link-Check-Job is a scheduled job that checks the links of the certificate types.
It is configured to run every day at 03:00 AM, although this and the threshold of how many times a link can be accessed before it is considered broken can be changed in the application.properties file.This may also be customized for every single environment if needed.
As written in the application.properties file, the link check can be disabled by setting the property app.link-check.max-retries to 0.
Additionally, WireMock is also included to serve testing purposes and simulating links in the dev environment. You may find a list of all available local links here: Admin Mappings More can be added if needed in the mappings folder.