2 Writing the App

The previous command createas a micronaut app with the default package example.micronaut in a folder named complete.

Due to the --features groovy flag, it generates a Groovy Micronaut app and it uses Gradle build system. However, you could use
other build tool such as Maven or other programming languages such as Java or Kotlin.

3 Management

Inspired by Spring Boot and Grails, the Micronaut management dependency adds support for monitoring
of your application via endpoints: special URIs that return details about the health and state of your application.

To use the management features described in this section, add the dependency on your classpath. For example, in build.gradle

build.gradle

dependencies {
...
..
compile "io.micronaut:micronaut-management"
}

4 Info endpoint

The info endpoint returns static information from the state of the application. The info exposed can be provided by any number of "info sources".

Enable the info endpoint:

src/main/resources/application.yml

endpoints:
info:
enabled: true
sensitive: false

5 Gradle Git Properties Plugin

If a git.properties file is available on the classpath, the GitInfoSource
will expose the values in that file under the git key. Generating of a git.properties file will need to be configured
as part of your build; for example, you may choose to use the Gradle Git Properties plugin. The plugin
provides a task named generateGitProperties responsible for the git.properties file generation. It is automatically invoked upon the execution of the classes task. You
can find the generated file in the directory build/resources/main.