This project was build to be part of my personal portfolio. It is just a sample code that is not intended to be used in production. This Spring Boot application provides a REST API for an oversimplified ecommerce website without integration with payment or delivery methods. It includes CRUD operations for Product, Category, User, PurchaseOrder and PurchaseOrderLine entities. It also includes a simple authentication mechanism using JWT.
- Java 21
- Spring Boot 3
- Spring Webflux
- Spring Security
- Liquibase
- PostgreSQL
- Spring Data R2DBC (including queries with pagination and sorting)
- Test Containers
- Swagger
- JWT authentication
- Junit
- Lombok
- Maven
http://localhost:8080/swagger-ui.html
- cd src/main/resources/cert
- openssl genrsa -out keypair.pem 2048
- openssl rsa -in keypair.pem -pubout -out public.pem
- openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in keypair.pem -out private.pem
- delete keypair.pem
docker run --detach --name postgres --env POSTGRES_PASSWORD=postgres:17.2 --publish 5432:5432 postgres
./mvnw liquibase:update
./mvnw liquibase:rollback "-Dliquibase.rollbackCount=1"
simple-online-store-java.postman_collection.json
./mvnw spring-boot:run -Dspring-boot.run.profiles=local
./mvnw spring-boot:build-image
docker run -d --add-host host.docker.internal:host-gateway --name ecommerce-java -p 8080:8080 ecommerce-java:0.0.2-SNAPSHOT