This repository contains examples of Micronaut.
The following examples are featured.
The hello-world-java example is a simple Hello World implementation written in Java.
To run the application with Gradle use:
$ cd hello-world-java
$ ./gradlew run
To run the application with Maven use:
$ ./mvnw exec:exec
Then go to http://localhost:8080/hello/John
To run the tests run ./gradlew test
or /mvnw test
.
The hello-world-groovy
example is a simple Hello World implementation written in Groovy.
To run the application with Gradle use:
$ cd hello-world-groovy
$ ./gradlew run
Then go to http://localhost:8080/hello/John
The hello-world-kotlin
example is a simple Hello World implementation written in Kotlin.
To run the application with Gradle use:
$ cd hello-world-kotlin
$ ./gradlew run
Then go to http://localhost:8080/hello/John
The petstore
example is a Micronaut petstore implementation featuring multiple Microservices and a docker-compose.yml
file for starting the application.
See the README
in the root of the petstore
example for usage instructions.
Example of REST
service built with Micronaut, with embedded neo4j
as database. It's a simple example without any kind of data validation, just shows how to register beans, a controller and a simple test.
Hope it helps!