This is a solution to the task "PROBLEM_1_ATM.md" - CLI to simulate an interaction of an ATM with retail bank.
mvn compile assembly:single
Result: target/console_atm.jar
java -jar console_atm.jar
or using IDE - just run com.okabanov.atm.Application.main
Press Ctrl D
to exit.
mvn tests
The project doesn't use any third party libraries for runtime. But will be good idea to use:
- spring-shell - for CLI autocomplete, suggestions and validations
- spring - for DI, if the application will have huge amount of services
- The
@Transactional
annotation is a mock for real transaction in DB - The
deposit
command should select the target account if there are two or more debts - The
login
command should also perform authentication (with password and storing SESSION_ID) - Services must send CRUD operations to the bank server
- The application must provide a unique ID for each request to avoid repeating the request over the network (mobile operators may repeat the full request)