Merge branch '2.7.x'

This commit is contained in:
Stephane Nicoll
2022-01-04 14:23:48 +01:00
8 changed files with 212 additions and 5 deletions

View File

@@ -1165,13 +1165,18 @@ When appropriate, Spring auto-configures the following `InfoContributor` beans:
| Exposes Java runtime information.
| None.
| `os`
| {spring-boot-actuator-module-code}/info/OsInfoContributor.java[`OsInfoContributor`]
| Exposes Operating System information.
| None.
|===
Whether or not an individual contributor is enabled is controlled by its `management.info.<id>.enabled` property.
Whether an individual contributor is enabled is controlled by its `management.info.<id>.enabled` property.
Different contributors have different defaults for this property, depending on their prerequisites and the nature of the information that they expose.
With no prerequisites to indicate that they should be enabled, the `env` and `java` contributors are disabled by default.
You can enable them by setting the configprop:management.info.env.enabled[] or configprop:management.info.java.enabled[] properties to `true`.
With no prerequisites to indicate that they should be enabled, the `env`, `java`, and `os` contributors are disabled by default.
Each can be enabled by setting its `management.info.<id>.enabled` property to `true`.
The `build` and `git` info contributors are enabled by default.
Each can be disabled by setting its `management.info.<id>.enabled` property to `false`.
@@ -1262,6 +1267,12 @@ The `info` endpoint publishes information about your Java runtime environment, s
[[actuator.endpoints.info.os-information]]
==== OS Information
The `info` endpoint publishes information about your Operating System, see {spring-boot-module-api}/info/OsInfo.html[`OsInfo`] 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.