Skip to content

ssouris/micronaut-kotlin-example

Repository files navigation

Micronaut example

Simple micro-service that queries and caches an exchange rate API to convert an amount to a currency

example request:

curl -v -X POST localhost:8080/api/convert \
    -d '{"fromCurrency" : "EUR", "toCurrency" : "USD", "amount": 1600 }' 
    -H 'Content-Type: application/json' | jq

Tech used:

  • Kotlin
  • Micronaut with Non-blocking API(s)
  • Caffeine cache through Micronaut
  • Spock for testing

Caveats:

  • Global error handling did not work really well with reactive types (no way to catch exception inside reactive stream and return custom status code)

Useful links:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published