A basic REST API for money transfer between accounts.
- Java (Language)
- Jetty (Embedded web server)
- Jersey (JAX-RS implementation)
- Guice (Dependency Injection)
- H2 (Embedded/In-memory database)
- HikariCP (DB Connection pool)
- Logback (Logging)
Java 8+
In project root directory, type the command below to build fat jar
./gradlew shawdowJar
In project root directory, type the command below to run
java -jar build/libs/money_transfer-0.1-all.jar
or
./gradlew run
In project root directory, type the command below to run the unit test and integration test included in the project
./gradlew test
GET /account
- get all accountsGET /account/{username}
- get account details for usernamePOST /account
- Create new accountDELETE /account/{username}
- delete account by usernameGET /account/{username}/credit?amount=100
- Credit or Contribute 100 to account owned by username.GET /account/{username}/debit?amount=100
- Debit or Withdraw 100 from account owned by username.GET /account/{username1}/transfer?to={username2}&amount=100
- Transfer 100 from account owned by username1 to account owned by username2.