Class EnvironmentEndpoint

java.lang.Object
io.micronaut.management.endpoint.env.EnvironmentEndpoint

@Endpoint(id="env", defaultEnabled=false) public class EnvironmentEndpoint extends Object
Endpoint that displays information about the environment and its property sources.
Since:
1.2.0
Author:
Álvaro Sánchez-Mariscal
  • Field Details

  • Constructor Details

  • Method Details

    • getActiveKeys

      public List<String> getActiveKeys()
      Gets the keys to be displayed by the environment endpoint. Defaults to ["activeEnvironments", "packages", "propertySources"] if not configured. Configurable via endpoints.env.active-keys.
      Returns:
      The list of active sections.
    • setActiveKeys

      public void setActiveKeys(List<String> activeKeys)
      Sets the sections to be displayed by the environment endpoint. Example: endpoints.env.active-keys=activeEnvironments,packages
      Parameters:
      activeKeys - The list of sections. If an empty list is provided, no sections will be displayed.
    • getEnvironmentInfo

      @Read public Map<String,Object> getEnvironmentInfo()
      Returns:
      The environment information as a map with the following keys: activeEnvironments, packages and propertySources.
    • getProperties

      @Read public Map<String,Object> getProperties(@Selector String propertySourceName)
      Parameters:
      propertySourceName - The PropertySource name
      Returns:
      a map with all the properties defined in the property source if it exists; null otherwise.