项目作者: enesacikoglu

项目描述 :
Kotlin Micronaut Transfer Api
高级语言: Kotlin
项目地址: git://github.com/enesacikoglu/kotlin-micronaut-transferex-api.git


micronaut-transferex-api

RestFul money transfer service uses following Technologies:

  • Micronaut
  • Kotlin
  • Hexagonal Arch
  • CQRS
  • Jpa
  • H2 DB

Build

mvn clean install

Run

java -jar target/micronaut-transferex-api-1.0.0.jar

Tests

mvn test

Usage

By default, the API is accessible on port 6161.
The following requests are supported:

  • POST /accounts - create new account request.
    Request body example:
  1. {
  2. "owner":"Enes Açıkoğlu",
  3. "balance":1200.50
  4. }
  • GET /accounts/2 - account by id

  • GET /accounts - gets all accounts

  • GET /transactions/2 transaction by id

  • GET /transactions gets all transactions

  • POST /transfers - transfers between accounts.
    Request body example:

  1. {
  2. "fromAccount":1,
  3. "toAccount":2,
  4. "amount":100.50
  5. }