Simple standalone application for money transfers between accounts.
- JAX-RS 2.1 / Jersey 2.27
- Grizzly HTTP server
- Maven 3+
- Java 1.8+
- JPA / Hibernate
- JTA for transaction management
- c3p0 connection pool
- Log4J for logging
- H2 in-memory Database latest
mvn exec:java
Application starts on
http://localhost:8080/rest-jersey/
HTTP METHOD | PATH | USAGE | TESTS |
---|---|---|---|
GET | /account/{accountId} | get account by accountId | - |
PUT | /account/create | create a new account | - |
DELETE | /account/{accountId} | remove account by accountId | - |
PUT | /account/{accountId}/withdraw/{amount} | withdraw money from account | - |
PUT | /account/{accountId}/deposit/{amount} | deposit money to account | - |
POST | /transfer | perform transfer from one account to another | + |
HTTP METHOD | PATH | USAGE |
---|---|---|
GET | /account/all | get all accounts |
GET | /account/{accountId}/balance | get account balance by accountId |
- Implement left services
- Cover all tests