- BFF Spring Boot API
Important
The version of Java used by the project must match the version output by ./mvnw --version
Tip
Set JAVA_HOME to the location where your Java JDK is installed
Build system is Maven
- Maven Plugin
- A local Maven wrapper is included:
./mvnw.
# test
./mvnw test
# generate a .jar
./mvnw clean package
# skip tests
./mvnw clean package -DskipTests
# run
./mvnw spring-boot:run
# override default dev,local profiles
./mvnw spring-boot:run -Dapp.profiles=testhttp://localhost:8080/swagger-ui/index.html
The easiest way to get the backend environment running is with Docker Compose. https://spring.io/guides/gs/spring-boot-docker
# before using any container method, first build the project with Maven
./mvnw clean package -DskipTests# then build the container with the Dockerfile
docker build -t chemlab .
# or build an image with Maven (Dockerfile is ignored)
./mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=chemlab
# finally run the container
docker run -e "SPRING_PROFILES_ACTIVE=dev" -p 8080:8080 -t chemlabDownload, install MongoDB.
docker pull mongo:7.0.40-jammy
docker run --name mongodb -p 27017:27017 -d mongo:7.0.40-jammyRepository layer tests leverage MongoDB Testcontainers. A container runtime will need to be present before running repository tests.
$ sops -d src/main/resources/application-prod.enc.yml > src/main/resources/application-prod.yml
- generate an age key pair:
age-keygen -o key.txt - add the key pair to a location where sops will find it
- add the
agepublic key to.sops.yaml - run
updatekeys:
sops updatekeys src/main/resources/application-prod.enc.yml
sops encrypt src/main/resources/application-prod.yml > src/main/resources/application-prod.enc.yml