ekino open source

Micronaut Demo

Overview

Demonstration of Micronaut's features through a simple microservices application and three hello worlds.

All subprojects have a dedicated README.

This repository was used as a demonstration for :

Microservices

Requirements

  • JDK 8
  • Docker Compose 1.19 +

A simple read-only Micronaut application with three microservices : book, user and borrowing.

Run

Run the discovery and tracing servers first from project root:

cd microservices && docker-compose up -d

Then run each of the services in three terminals from project root:

cd microservices/book && ./gradlew clean run

cd microservices/borrowing && ./gradlew clean run

cd microservices/user && ./gradlew clean run

All services will be automatically registered to Consul and listed on its dashboard. You'll be able to trace all your request on Jaeger dashboard.

The exposed resources are:

Testing the fallback is working

Stopping either the book or user service will automatically trigger the use of their respective fallbacks

Hello Worlds

Three simple and comparable hello world applications in Micronaut, Spring Boot and Micronaut as a Graal native image.

Requirements

  • JDK 8
  • UNIX system (for the Graal native image only)
  • Optional: Graal SDK 1.0.0-RC8 (for building the native image yourself)

Run

Micronaut :

cd hello-worlds/hello-micronaut && ./gradlew clean run

Spring Boot :

cd hello-worlds/hello-spring-boot && ./gradlew clean bootRun

Micronaut with Graal :

Linux 64 bits: ./hello-worlds/hello-micronaut-graal/hello-micronaut-graal-linux

Mac 64 bits: ./hello-worlds/hello-micronaut-graal/hello-micronaut-graal-mac

Refer to hello-micronaut-graal's README for building the native image yourself.

The exposed resources are: