Skip to content

Commit 24ac190

Browse files
committed
Finish project setup
1 parent f34b75e commit 24ac190

File tree

3 files changed

+38
-5
lines changed

3 files changed

+38
-5
lines changed

README.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
11

22
[![License](https://img.shields.io/github/license/eitco/spring-config-generator.svg?style=for-the-badge)](https://opensource.org/license/mit)
3+
[![Build status](https://img.shields.io/github/actions/workflow/status/eitco/documentation-configuration-metadata-processor/deploy.yaml?branch=main&style=for-the-badge&logo=github)](https://github.com/eitco/documentation-configuration-metadata-processor/actions/workflows/deploy.yaml)
4+
[![Maven Central Version](https://img.shields.io/maven-central/v/de.eitco.cicd/documentation-configuration-metadata-processor?style=for-the-badge&logo=apachemaven)](https://central.sonatype.com/artifact/de.eitco.cicd/documentation-configuration-metadata-processor)
35

4-
[//]: # ([![Build status](https://img.shields.io/github/actions/workflow/status/eitco/spring-config-generator/deploy.yaml?branch=main&style=for-the-badge&logo=github)](https://github.com/eitco/spring-config-generator/actions/workflows/deploy.yaml))
5-
[//]: # ([![Maven Central Version](https://img.shields.io/maven-central/v/de.eitco.cicd/spring-config-generator?style=for-the-badge&logo=apachemaven)](https://central.sonatype.com/artifact/de.eitco.cicd/spring-config-generator))
6-
7-
# additional-spring-configuration-metadata-processor
6+
# documentation-configuration-metadata-processor
87

98
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`.

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
</developer>
2727
</developers>
2828

29+
<scm>
30+
<url>https://github.com/eitco/documentation-configuration-metadata-processor.git</url>
31+
<connection>scm:git:https://github.com/eitco/documentation-configuration-metadata-processor.git</connection>
32+
<developerConnection>scm:git:https://github.com/eitco/documentation-configuration-metadata-processor.git</developerConnection>
33+
</scm>
34+
2935
<dependencies>
3036
<dependency>
3137
<groupId>org.springframework.boot</groupId>

src/main/java/de/eitco/cicd/ascmp/AdditionalMetadataProcessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import javax.annotation.processing.AbstractProcessor;
1212
import javax.annotation.processing.ProcessingEnvironment;
1313
import javax.annotation.processing.RoundEnvironment;
14+
import javax.annotation.processing.SupportedAnnotationTypes;
1415
import javax.annotation.processing.SupportedSourceVersion;
1516
import javax.lang.model.SourceVersion;
1617
import javax.lang.model.element.Element;

0 commit comments

Comments
 (0)