@groovy.util.logging.Slf4j @groovy.transform.CompileStatic class ConfigReportCommand extends java.lang.Object implements ApplicationCommand
An ApplicationCommand that generates an AsciiDoc report of the application's resolved configuration properties.
Properties are collected directly from the Spring ConfigurableEnvironment, iterating all EnumerablePropertySource instances to capture every resolvable property regardless of how it was defined (YAML, Groovy config, system properties, environment variables, etc.).
Usage:
grails config-report
./gradlew configReport
The report is written to config-report.adoc in the project's base directory.
| Modifiers | Name | Description |
|---|---|---|
static class |
ConfigReportCommand.ConfigPropertyMetadata |
|
static class |
ConfigReportCommand.MetadataResult |
| Type | Name and description |
|---|---|
static java.lang.String |
DEFAULT_REPORT_FILE |
java.lang.String |
description |
| Constructor and description |
|---|
ConfigReportCommand() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.util.Map<java.lang.String, java.lang.String> |
collectEnvironmentProperties(java.util.Map<java.lang.String, java.lang.String> runtimeProperties) |
|
java.util.Map<java.lang.String, java.lang.String> |
collectProperties(ConfigurableEnvironment environment)Collects all configuration properties from the Spring ConfigurableEnvironment by iterating its EnumerablePropertySource instances. |
|
static java.lang.String |
escapeAsciidoc(java.lang.String value)Escapes special AsciiDoc characters in a value string. |
|
java.lang.String |
fallbackGroup(java.lang.String name) |
|
java.lang.String |
formatDefaultValue(java.lang.Object defaultValue) |
|
boolean |
handle(ExecutionContext executionContext) |
|
boolean |
isGrailsProperty(java.lang.String name) |
|
java.util.Map<java.lang.String, java.lang.String> |
loadGroupDescriptions(java.lang.Object groupsObject) |
|
ConfigReportCommand.MetadataResult |
loadPropertyMetadata() |
|
java.lang.String |
resolveGroup(java.lang.String name, java.util.Set<java.lang.String> groupNames) |
|
void |
writeReport(java.util.Map<java.lang.String, java.lang.String> runtimeProperties, java.io.File reportFile)Writes the configuration properties as an AsciiDoc file grouped by top-level namespace. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Collects all configuration properties from the Spring ConfigurableEnvironment by iterating its EnumerablePropertySource instances. Property values are resolved through the environment to ensure placeholders are expanded and the correct precedence order is applied.
environment - the Spring environmentEscapes special AsciiDoc characters in a value string.
value - the raw valueWrites the configuration properties as an AsciiDoc file grouped by top-level namespace.
sorted - the sorted configuration propertiesreportFile - the file to write the report to