Skip to content

Commit d24720d

Browse files
committed
Polish "Expose OS information as an InfoContributor"
See gh-28907
1 parent c700f68 commit d24720d

File tree

8 files changed

+11
-12
lines changed

8 files changed

+11
-12
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/info/InfoContributorAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@
282282
{
283283
"name": "management.info.os.enabled",
284284
"type": "java.lang.Boolean",
285-
"description": "Whether to enable OS info.",
285+
"description": "Whether to enable Operating System info.",
286286
"defaultValue": false
287287
},
288288
{

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoContributorAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/OsInfoContributor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/info/OsInfoContributorTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@
1818

1919
import org.junit.jupiter.api.Test;
2020

21-
import org.springframework.boot.info.JavaInfo;
2221
import org.springframework.boot.info.OsInfo;
2322

2423
import static org.assertj.core.api.Assertions.assertThat;
@@ -28,7 +27,7 @@
2827
*
2928
* @author Jonatan Ivanov
3029
*/
31-
public class OsInfoContributorTests {
30+
class OsInfoContributorTests {
3231

3332
@Test
3433
void osInfoShouldBeAdded() {

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/endpoints.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,11 +1176,11 @@ When appropriate, Spring auto-configures the following `InfoContributor` beans:
11761176

11771177
|===
11781178

1179-
Whether or not an individual contributor is enabled is controlled by its `management.info.<id>.enabled` property.
1179+
Whether an individual contributor is enabled is controlled by its `management.info.<id>.enabled` property.
11801180
Different contributors have different defaults for this property, depending on their prerequisites and the nature of the information that they expose.
11811181

1182-
With no prerequisites to indicate that they should be enabled, the `env`, `java` and `os` contributors are disabled by default.
1183-
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`.
1182+
With no prerequisites to indicate that they should be enabled, the `env`, `java`, and `os` contributors are disabled by default.
1183+
Each can be enabled by setting its `management.info.<id>.enabled` property to `true`.
11841184

11851185
The `build` and `git` info contributors are enabled by default.
11861186
Each can be disabled by setting its `management.info.<id>.enabled` property to `false`.

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/info/OsInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/info/OsInfoTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)