This project is a API Rest that receive transactions and return statistic this transaction. This project is lab of learn about design pattern.
This Api receive transactions and calc quant, sum, average, min value and max value of transactions.
-
Java Version: 21
-
Libraries:
spring-bootjackson-databindspring-boot-starter-test
-
Build Tool: Maven
Notification pattern: (Based DDD) See into class Notification.javaSelf validation pattern: (Based DDD) See into class TransactionRequest.java
- Open your command-line terminal.
- Navigate to the project directory: Example - cd /Enviroment/youworkspace/transaction-statistics
- Execute the command: mvn clean package
- Execute the command: java -jar target/app-0.1.jar
- Execute curl the terminal: -
curl --location 'localhost:8080/transaction' \ --header 'Content-Type: application/json' \ --data '{ "value":"90", "dateTime":"2025-07-13T15:40:00Z" }'
- Open your command-line terminal.
- Navigate to the project directory: Example - cd /Enviroment/youworkspace/transaction-statistics
- Execute the command: mvn clean package
- Execute the command for create an image docker: docker buildx build -t transaction-statistics:v1 .
- Execute the command for running image: docker run -it -p 8080:8080 transaction-statistics:v1
- Execute curl the terminal: -
curl --location 'localhost:8080/transaction' \ --header 'Content-Type: application/json' \ --data '{ "value":"90", "dateTime":"2025-07-13T15:40:00Z" }'