This project aim to learn Spring Boot best practice, architecture design, and improve my skill. Concept of this project for simulate manage stock system feature to know how it's work and what design is.
- Homebrew
- Maven 3.9.5
- Amazon Corretto 17
- Java version manager
- Docker Desktop
- IntelliJ IDEA Community
- Google Java Format
- SonarLint
- CommitLint
- GPG signing key
If you need to contribute with the project, first step, you need to set up commitlint for verify the commit message.
I prepare for these steps for setting up by open terminal
and run make setup-commitlint
.
Go to src/main/resourse
file application.yml
Datasource Connection
Port 5432
is default port of the PostgreSQL
localhost
- Local environment is not using docker networkpostgres
- Local environment is using docker network
Credentials of the PostgreSQL to establish connection
postgres
is a setting value forusername
andpassword
Redis Connection
Port 6379
is default port of the Redis
localhost
- Local environment is not using docker networkredis
- Local environment is using docker network
Credentials of the Redis to establish connection
default
is default username of the Redis.redis
is setting value in the docker compose--requirepass
argument
Note: change datasource config
correctly before start application.
- Start database container at first.
docker compose up -d postgres --build
- Check docker image
docker image ls
- Check docker container running
docker container ls
- Start application from terminal
mvn spring-boot:run
- Stop docker compose and remove container
docker compose down
In this section, we define the API endpoint & URLs for any resource as a Swagger. Please run the service and access API specification via web browser.
http://localhost:8080/swagger-ui/index.html
General
Code Pattern
- [SOLID]
- Facade
- [Builder]
Design System
- Database Entity of Inventory System
- Writing Address in English
- Database Naming Convention Best Practice
Development
- Spring Boot
- Postgresql
- [Unit test in Spring Boot]
- [Integration test in Spring Boot]
Deployment
- Logging Format - Better Stack
- [Log Level]
- OpenTelemetry Logging
- Three pillars of Observability
- Setup OpenTelemetry in Spring Boot
- [Spring Boot with Actuator]
- [Kubernetes]
Java
Spring Boot
- API Security
- [Long-live Credentials]
- [Authentication & Authorization]
- API Performance
- Aspect Oriented Programming
- Race Condition
Spring Email
Spring Data JPA
- Getting started with Spring Data JPA
- Advanced Spring Data JPA - Specifications and Querydls
- Advanced Spring Data JPA - Specification
- JPA Metamodel Generator
- JPA Metamodel Generator - Baedung
- Spring Data REST Relationship
Redis Cache
- Connect to Redis server via Redisinsight
- [Redis Sentinal]
- [Redis Cluster with Leader-Follower]
RabbitMQ
- [Dead-Letter Message]