This is a demo microservice for the account transaction as part of mobile challengers banking.
- Java 11
- Spring Boot 2.4.1
- Spring REST API (Spring Web)
- Lombok 1.18.16
- Spring Data JPA & H2 in-memory database (exposed the client dashboard to see the records)
- springdoc-openapi-ui - Auto generated API documentation using OpenAPI 3.0 and exposed Swagger UI for the same (Refer the link at the bottom of this page)
- Dockerized (Dockerfile is included and used the latest concept called multi-layered image building for optimized build time)
- TDD approach using JUnit 5, Mockito, and Spring Boot Test
- JaCoCo for code coverage
- Spring boot starter validation for request validation
cd <project_directory>
mvn clean package
Step 3: Build the docker image and store it in a local repository (Dockerfile is there in the root of the directory itself)
docker build . --tag account-transaction-service
docker run -it -p 8080:8080 account-transaction-service:latest
Note: I have used multi-layered approach in docker and spring.
http://localhost:8080/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config
Note: Also Postman Collection has been pushed into the repository for your reference.
http://localhost:8080/h2-console/login.jsp
Note: Username and Password for the in-memory H2 database can be set differently by passing environment variables namely DB_USER
and DB_PWD
if required, else H2 db provided default username and password will be used. For more details please refer: application.yml