https://github.com/eitco/spring-config-collector-maven-plugin
a maven plugin collecting all spring configuration properties and generating documentation for them
https://github.com/eitco/spring-config-collector-maven-plugin
Last synced: 10 months ago
JSON representation
a maven plugin collecting all spring configuration properties and generating documentation for them
- Host: GitHub
- URL: https://github.com/eitco/spring-config-collector-maven-plugin
- Owner: eitco
- License: mit
- Created: 2024-07-22T10:15:46.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-23T12:56:13.000Z (about 1 year ago)
- Last Synced: 2025-06-08T21:39:10.444Z (12 months ago)
- Language: Java
- Size: 32.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://opensource.org/license/mit)
[](https://github.com/eitco/spring-config-collector-maven-plugin/actions/workflows/deploy.yaml)
[](https://central.sonatype.com/artifact/de.eitco.cicd/spring-config-collector-maven-plugin)
# spring config collector maven plugin
This maven plugin collects all spring configuration properties of the project and its dependencies and creates
documentation for them, either in plain html or in asciidoc.
It does so by collection spring boots own configuration meta information files, that can be found inside
jars in `META-INF/spring-configuration-metadata.json`.
> 📘 Note that this only finds configuration properties defined by classes annotated with `@ConfigurationProperties`.
> `@Value` configuration properties will not be found.
# usage
First, add this plugin to your pom:
````xml
de.eitco.cicd
spring-config-collector-maven-plugin
4.0.1
````
Decide whether you want to generate an adoc file or an html file, and add
an execution of the corresponding goal (This example simply executes both goals):
````xml
de.eitco.cicd
spring-config-collector-maven-plugin
4.0.1
adoc
adoc-overview
html-overview
````
This will write the generated files to the target directory. You can specify the directory to write to using the
`outputDirectory` parameter:
````xml
de.eitco.cicd
spring-config-collector-maven-plugin
4.0.1
adoc
adoc-overview
html-overview
${project.build.directory}/config-documentation
````
When building the project this will create an html file and an adoc file containing information about every member of all configuration properties of your application.
This does however include spring standard properties, this might or might not be desired. Should this not be desired
you can filter property names using a regular expression:
````xml
de.eitco.cicd
spring-config-collector-maven-plugin
4.0.1
adoc
adoc-overview
html-overview
${project.build.directory}
my\.property\.prefix\..*|other-prefix.*
````
In this case only properties that begin with `my.property.prefix` or `other-prefix` will be listed in the resulting files.
For better formatting of the generated table the plugin can shorten the class names of the properties, removing the package
and generic types. This can be enabled using the property `true`.
For further examples see the [integration test directory](./src/it).