Example of custom Endpoint

The following example Endpoint class will create an endpoint accessible at /date:

CurrentDateEndpoint

  1. import io.micronaut.management.endpoint.annotation.Endpoint;
  2. @Endpoint(id = "date",
  3. prefix = "custom",
  4. defaultEnabled = true,
  5. defaultSensitive = false)
  6. public class CurrentDateEndpoint {
  7. //.. endpoint methods
  8. }

CurrentDateEndpoint

  1. import io.micronaut.management.endpoint.annotation.Endpoint
  2. @Endpoint(id = "date",
  3. prefix = "custom",
  4. defaultEnabled = true,
  5. defaultSensitive = false)
  6. class CurrentDateEndpoint {
  7. //.. endpoint methods
  8. }

CurrentDateEndpoint

  1. import io.micronaut.management.endpoint.annotation.Endpoint
  2. @Endpoint(id = "date", prefix = "custom", defaultEnabled = true, defaultSensitive = false)
  3. class CurrentDateEndpoint {
  4. //.. endpoint methods
  5. }