This is a sample project for a Bank Account API built using Spring Boot and Axon Framework.
- Java 11 or later
- Maven 3.6 or later
To build the project, run the following command in the root directory of the project:
mvn clean install
To run the application, you can use the following command:
mvn spring-boot:run
This will start the application on port 8080
by default. You can access the API documentation by visiting http://localhost:8080/swagger-ui.html in your browser.
To run the test, use the followung command:
mvn test
THe following API endpoints are available:
###Create an Account
POST/ accounts
Create a new bank account
Request Body:
{
"customerId": "string"
}
POST /accounts/{accountId}/credit
Credit the specified bank account.
Path Variables:
accountId
: The ID of the account to credit.
Request Body:
{
"amount": 0
}
POST /accounts/{accountId}/debit
Debit the specified bank account.
Path Variables:
accountId
: The ID of the account to debit.
Request Body:
{
"amount": 0
}
- Spring Boot - Web framework for building RESTful APIs
- Axon Framework - CQRS and event sourcing framework
- Swagger - API documentation tool
This project is licensed under the MIT License - see the LICENSE file for details.