|
1 | 1 |
|
2 | 2 | [](https://opensource.org/license/mit) |
| 3 | +[](https://github.com/eitco/documentation-configuration-metadata-processor/actions/workflows/deploy.yaml) |
| 4 | +[](https://central.sonatype.com/artifact/de.eitco.cicd/documentation-configuration-metadata-processor) |
3 | 5 |
|
4 | | -[//]: # ([](https://github.com/eitco/spring-config-generator/actions/workflows/deploy.yaml)) |
5 | | -[//]: # ([](https://central.sonatype.com/artifact/de.eitco.cicd/spring-config-generator)) |
6 | | - |
7 | | -# additional-spring-configuration-metadata-processor |
| 6 | +# documentation-configuration-metadata-processor |
8 | 7 |
|
9 | 8 | This [java annotation processor](https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html) generates additional spring configuration metadata for the |
10 | | -[configuration documentation generation plugin](https://github.com/eitco/spring-config-collector-maven-plugin). |
| 9 | +[configuration documentation generation plugin](https://github.com/eitco/spring-config-collector-maven-plugin). |
| 10 | + |
| 11 | +It's main usage is to generate configuration metadata for classes used in collections in |
| 12 | +`@ConfigurationProperties` classes, which are ignored by the `spring-boot-configuration-processor`. |
| 13 | + |
| 14 | +## Usage |
| 15 | + |
| 16 | +Add a dependency to the processor to your POM: |
| 17 | + |
| 18 | +````xml |
| 19 | +<dependency> |
| 20 | + <groupId>de.eitco.cicd</groupId> |
| 21 | + <artifactId>documentation-configuration-metadata-processor</artifactId> |
| 22 | + <optional>true</optional> |
| 23 | + <version>processor-version</version> |
| 24 | +</dependency> |
| 25 | +```` |
| 26 | +Annotate classes to generate metadata for with: |
| 27 | + |
| 28 | +````java |
| 29 | +@AdditionalConfigurationMetadata(groups = {"TestGroup1","TestGroup2"}) |
| 30 | +```` |
| 31 | +The annotation requires one or more group names. The names are used to merge the generated configuration metadata with |
| 32 | +metadata generated by the `spring-boot-configuration-processor`. By setting more than ony group it is possible to reuse |
| 33 | +metadata at several places in the generated documentation. |
| 34 | + |
| 35 | +The processor supports the `@NestedConfigurationProperty` annotation from Spring Boot in classes annotated with |
| 36 | +`@AdditionalConfigurationMetadata`. |
0 commit comments