This is a corebanking Spring Boot REST API. It has functionality for client and account management, as well as for common basic operations such as deposits and withdrawals, and more slightly complex ones, like transfers between accounts.
Check the project's Swagger documentation for details and information on the endpoints.
Just head to
/swagger-ui/index.html
after running the Spring-Boot application.
Swagger doesn't only provide documentation,
you can try out the endpoints as well,
just like as you would do with Postman!
A Client has a collection of Account objects.
An Account has a collection of Operation objects.
These operations implement the Runnable interface.
Therefore, they can be executed by a Thread,
or simply by calling their .run() method, for example.
A boolean field alreadExecuted stores the state of an Operation.
Each Account maintains its collection/list of operations i.e. its history.
Most operations use no service, like deposits and withdrawals.
That is, a simple Operation just calls the appropriate method of an Account object.
This is not true for transfers.
For these we use an AccountService,
which also is responsible for creating the Account objects and saving them in the database,
which is handled by AccountRepository.
-
mvn cleancleans
target/directory, where maven build files are kept -
mvn installbuilds the project
-
mvn testRuns unit tests Also, pay attention: test coverage reports are generated by JaCoCo, and kept in
target/site/jacoco/. You can view the test results displayed nicely by accessingtarget/site/jacoco/index.html. -
mvn compileThe compile build phase compiles the source of the project. Since
googleformatter-maven-pluginhas been added, this command formats code according to Google Java Format standards. -
mvn spring-boot:runruns the Spring Boot application