Collect and display build information

This commit updates the Maven plugin to generate a
`META-INF/boot/build.properties` file with various build-specific
settings (group, artifact, name, version and build time). Additionally,
the plugin can be configured to write an arbitrary number of additional
properties.

A new `BuildProperties` bean is automatically exposed when such a file is
present. If that bean is present, an `InfoContributor` is automatically
created to expose that information under the `build` key.

As for the git contributor, it is possible to only display the core
settings or everything using the `management.info.build.mode` property.

See gh-2559
This commit is contained in:
Stephane Nicoll
2016-03-04 13:25:23 +01:00
parent 3e6b584953
commit dddea70985
31 changed files with 1024 additions and 112 deletions

View File

@@ -80,7 +80,8 @@ content into your application; rather pick only the properties that you need.
spring.hazelcast.config= # The location of the configuration file to use to initialize Hazelcast.
# PROJECT INFORMATION ({sc-spring-boot-autoconfigure}/info/ProjectInfoProperties.{sc-ext}[ProjectInfoProperties])
spring.info.git.location=classpath:git.properties # Location of the generated git info properties file
spring.info.build.location=classpath:META-INF/boot/build.properties # Location of the generated build.properties file.
spring.info.git.location=classpath:git.properties # Location of the generated git.properties file.
# JMX
spring.jmx.default-domain= # JMX domain name.
@@ -888,6 +889,8 @@ content into your application; rather pick only the properties that you need.
management.health.status.order=DOWN, OUT_OF_SERVICE, UNKNOWN, UP # Comma-separated list of health statuses in order of severity.
# INFO CONTRIBUTORS
management.info.build.enabled=true # Enable build info.
management.info.build.mode=simple # Mode to use to expose build information.
management.info.defaults.enabled=true # Enable default health indicators.
management.info.env.enabled=true # Enable environment info.
management.info.git.enabled=true # Enable git info.