ru.mihkopylov:spring-boot-configuration-properties-descriptor-maven-plugin

Plugin to generate documentation for the Spring Boot application configuration

Лицензия

Лицензия

Категории

Категории

Spring Boot Контейнер Микросервисы Maven Компиляция и сборка Configuration Библиотеки уровня приложения config
Группа

Группа

ru.mihkopylov
Идентификатор

Идентификатор

spring-boot-configuration-properties-descriptor-maven-plugin
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

ru.mihkopylov:spring-boot-configuration-properties-descriptor-maven-plugin
Plugin to generate documentation for the Spring Boot application configuration
Ссылка на сайт

Ссылка на сайт

https://github.com/mih-kopylov/spring-boot-configuration-properties-descriptor-maven-plugin
Система контроля версий

Система контроля версий

https://github.com/mih-kopylov/spring-boot-configuration-properties-descriptor-maven-plugin/tree/master

Скачать spring-boot-configuration-properties-descriptor-maven-plugin

Как подключить последнюю версию

<plugin>
    <groupId>ru.mihkopylov</groupId>
    <artifactId>spring-boot-configuration-properties-descriptor-maven-plugin</artifactId>
    <version>1.0.0</version>
</plugin>

Зависимости

compile (9)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 3.1.1
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.4
org.apache.maven : maven-core jar 3.1.1
org.apache.maven : maven-project jar 3.0-alpha-2
org.apache.maven.scm : maven-scm-api jar 1.9.4
org.codehaus.plexus : plexus-interactivity-api jar 1.0-alpha-6
org.twdata.maven : mojo-executor jar 2.3.0
com.fasterxml.jackson.core : jackson-databind jar 2.10.0
org.freemarker : freemarker jar 2.3.29

provided (1)

Идентификатор библиотеки Тип Версия
org.projectlombok : lombok jar 1.18.10

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

Spring Boot Configuration Descriptor Processor Maven Plugin

Maven Central License

Description

When writing a service which has a lot of configuration, it is very useful to have a single document describing all possible properties of the service.

If the service binds properties to beans using @ConfigurationProperties, such beans with javadocs can be a single source of truth for the service configuration.

The goal of this plugin is to generate markdown description for all the @ConfigurationProperties.

Usage

To have this plugin work, it's required to have spring-boot-configuration-processor dependency that generates metadata /META-INF/spring-configuration-metadata.json which is used as a base for a resulting Markdown document.

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-configuration-processor</artifactId>
    <optional>true</optional>
</dependency>

And need to add the plugin to /build/plugins section of pom.xml.

<plugin>
    <groupId>ru.mihkopylov</groupId>
    <artifactId>spring-boot-configuration-properties-descriptor-maven-plugin</artifactId>
    <version>${spring-boot-configuration-properties-descriptor-maven-plugin.version}</version>
    <executions>
        <execution>
            <phase>compile</phase>
            <goals>
                <goal>describe</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Once mvn compile is run, a result CONFIGURATION.md file will be generated. By default it will be placed to root directory beside pom.xml, but this can be configured.

Configuration

This is the default configuration:

<plugin>
    <groupId>ru.mihkopylov</groupId>
    <artifactId>spring-boot-configuration-properties-descriptor-maven-plugin</artifactId>
    <version>${spring-boot-configuration-properties-descriptor-maven-plugin.version}</version>
    <configuration>
        <!--the metadata json file generated by Spring-->
        <jsonFileName>${project.build.outputDirectory}/META-INF/spring-configuration-metadata.json</jsonFileName>
        <!--should the plugin fail if the json metadata file is not found-->
        <failIfNoMetadataFileFound>false</failIfNoMetadataFileFound>
        <!--where to put the result file-->
        <outputFileName>${basedir}/CONFIGURATION.md</outputFileName>
    </configuration>
</plugin>

Версии библиотеки

Версия
1.0.0