Polish "Add Java InfoContributor"

See gh-28136
This commit is contained in:
Stephane Nicoll
2021-10-01 15:42:59 +02:00
parent fc87da7ef3
commit 5d17257a52
11 changed files with 247 additions and 286 deletions

View File

@@ -1157,6 +1157,9 @@ When appropriate, Spring auto-configures the following `InfoContributor` beans:
| {spring-boot-actuator-module-code}/info/BuildInfoContributor.java[`BuildInfoContributor`]
| Exposes build information if a `META-INF/build-info.properties` file is available.
| {spring-boot-actuator-module-code}/info/JavaInfoContributor.java[`JavaInfoContributor`]
| Exposes Java runtime information under the `java` key.
|===
TIP: You can disable them all by setting the configprop:management.info.defaults.enabled[] property.
@@ -1240,6 +1243,12 @@ See "<<howto#howto.build.generate-info,how to generate build information>>" for
[[actuator.endpoints.info.java-information]]
==== Java Information
The `info` endpoint publishes information about your Java runtime environment, see {spring-boot-module-api}/info/JavaInfo.html[`JavaInfo`] for more details.
[[actuator.endpoints.info.writing-custom-info-contributors]]
==== Writing Custom InfoContributors
To provide custom application information, you can register Spring beans that implement the {spring-boot-actuator-module-code}/info/InfoContributor.java[`InfoContributor`] interface.