File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
management/src/main/java/io/micronaut/management/endpoint/env Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ public EnvironmentEndpoint(Environment environment,
8080 /**
8181 * Gets the keys to be displayed by the environment endpoint.
8282 * Defaults to ["activeEnvironments", "packages", "propertySources"] if not configured.
83- * Configurable via {@code endpoints.env.active-keys}.
83+ * Configurable via {@code endpoints.env.active-keys} and {@code endpoints.env.keys} (keys is an alias) .
8484 *
8585 * @return The list of active sections.
8686 */
@@ -91,13 +91,24 @@ public List<String> getActiveKeys() {
9191 /**
9292 * Sets the sections to be displayed by the environment endpoint.
9393 * Example: {@code endpoints.env.active-keys=activeEnvironments,packages}
94+ * This setter is bound from the {@code endpoints.env.active-keys} configuration property.
9495 *
9596 * @param activeKeys The list of sections. If an empty list is provided, no sections will be displayed.
9697 */
9798 public void setActiveKeys (List <String > activeKeys ) {
9899 this .activeKeys = activeKeys ;
99100 }
100101
102+ /**
103+ * Alias for {@link #setActiveKeys(List)} to allow binding from configuration property {@code endpoints.env.keys}.
104+ * Example: {@code endpoints.env.keys=activeEnvironments,packages}
105+ *
106+ * @param keys The list of sections. If an empty list is provided, no sections will be displayed.
107+ */
108+ public void setKeys (List <String > keys ) {
109+ setActiveKeys (keys );
110+ }
111+
101112 /**
102113 * @return The environment information as a map with the following keys: activeEnvironments, packages and
103114 * propertySources.
You can’t perform that action at this time.
0 commit comments