Polish "Expose OS information as an InfoContributor"

See gh-28907
This commit is contained in:
Stephane Nicoll 2022-01-04 14:06:36 +01:00
parent c700f686c6
commit d24720d958
8 changed files with 11 additions and 12 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -282,7 +282,7 @@
{
"name": "management.info.os.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable OS info.",
"description": "Whether to enable Operating System info.",
"defaultValue": false
},
{

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -18,7 +18,6 @@ package org.springframework.boot.actuate.info;
import org.junit.jupiter.api.Test;
import org.springframework.boot.info.JavaInfo;
import org.springframework.boot.info.OsInfo;
import static org.assertj.core.api.Assertions.assertThat;
@ -28,7 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Jonatan Ivanov
*/
public class OsInfoContributorTests {
class OsInfoContributorTests {
@Test
void osInfoShouldBeAdded() {

View File

@ -1176,11 +1176,11 @@ When appropriate, Spring auto-configures the following `InfoContributor` beans:
|===
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`, `java` and `os` contributors are disabled by default.
You can enable them by setting the configprop:management.info.env.enabled[], configprop:management.info.java.enabled[] or configprop:management.info.os.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`.

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.