Skip to content

andyholst/openbank-spring

 
 

Repository files navigation

OpenBank - Spring Boot 2 application server

Build Status

Requirements

  • JDK 11
  • Maven 3.6.0 or Gradle 7.3.1+
  • Docker 1.19+

UML Diagram generation

By default, uml diagrams are generated by the build setup and stored at the root diagrams directory.

Generate the graphvis dot files to pdf by the command:

find . -type f -name "*.dot" -exec sh -c 'dot -Tpdf "${0}" -o "${0%.*}.pdf"' {} \;

Package OpenBank application

# Maven
mvn clean install -T 1C -DskipTests

# Gradle
./gradlew clean build -x test

Start the application

With Docker Compose

source setup_environment_variables.sh
docker-compose -f service/docker-compose.yaml up --build --force-recreate

With Kubernetes

source setup_environment_variables.sh
./start_openbank_in_kubernetes_cluster.sh

Run unit/system tests

# Maven
mvn clean install -T 1C

# Gradle
./gradlew clean build

Run integration tests

Prepare the environment with 'secret' environment variables.

source setup_environment_variables.sh

Prepare for Docker environment

source setup_docker_environment.sh

Prepare for Kubernetes environment

source setup_kubernetes_environment.sh

Execute the integration tests for specific environment

# Maven
mvn verify -Pintegrationtests

# Gradle
./gradlew integrationTests

Access on the fly RESTful API code generation

https://localhost:8443/v1/OpenBankAPI

Reference to OpenApi version 3.0.1 for documentation tasks

http:https://spec.openapis.org/oas/v3.0.1

Test the RESTful contracts

Load the src/main/resources/schema/OpenBankAPIv1.yaml file with the http:https://editor.swagger.io/ editor to easily test the RESTful contracts.

Work with SSL

Working with SSL

For SSL encryption for the application

Following commands was used:

# Generate private key and private csr file
openssl req -newkey rsa:2048 -nodes -keyout jsquad.key -out jsquad.csr

# Generate self signed key
openssl x509 -signkey jsquad.key -in jsquad.csr -req -days 365 -out jsquad.crt

# Generate PKCS12 key
openssl pkcs12 -inkey jsquad.key -in jsquad.crt -export -out jsquad.pfx

Generate JKS encryption for integration test communicating with SSL encrypted OpenBank app server

keytool -importkeystore -srckeystore jsquad.pfx -destkeystore jsquad.jks -srcstoretype PKCS12 -deststoretype JKS \
-srcstorepass \<secret password\> -deststorepass test1234 -destkeypass test1234

About

Simple bank app based om Spring

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 95.4%
  • Shell 4.3%
  • Dockerfile 0.3%