Browse Source

Move actuator heath code to spring-boot-health

Closes gh-46357
pull/47637/head
Phillip Webb 5 months ago
parent
commit
34e0382858
  1. 18
      documentation/spring-boot-actuator-docs/src/test/java/org/springframework/boot/actuate/docs/health/HealthEndpointDocumentationTests.java
  2. 12
      documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/endpoints.adoc
  3. 2
      documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/howto/actuator/maphealthindicatorstometrics/MyHealthMetricsExportConfiguration.java
  4. 2
      documentation/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/howto/actuator/maphealthindicatorstometrics/MyHealthMetricsExportConfiguration.kt
  5. 2
      documentation/spring-boot-docs/src/test/java/org/springframework/boot/docs/howto/actuator/maphealthindicatorstometrics/MetricsHealthMicrometerExportTests.java
  6. 1
      integration-test/spring-boot-actuator-integration-tests/build.gradle
  7. 0
      integration-test/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointAccessIntegrationTests.java
  8. 2
      integration-test/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointIntegrationTests.java
  9. 4
      integration-test/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointsAutoConfigurationIntegrationTests.java
  10. 4
      integration-test/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/health/HealthEndpointWebIntegrationTests.java
  11. 7
      integration-test/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/health/TestHealthEndpointGroup.java
  12. 1
      module/spring-boot-actuator-autoconfigure/build.gradle
  13. 24
      module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/availability/package-info.java
  14. 23
      module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/package-info.java
  15. 23
      module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/system/package-info.java
  16. 103
      module/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json
  17. 3
      module/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/spring.factories
  18. 5
      module/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  19. 1
      module/spring-boot-actuator/build.gradle
  20. 23
      module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/system/package-info.java
  21. 2
      module/spring-boot-cloudfoundry/src/main/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/CloudFoundryWebEndpointDiscoverer.java
  22. 8
      module/spring-boot-cloudfoundry/src/main/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/reactive/CloudFoundryReactiveActuatorAutoConfiguration.java
  23. 6
      module/spring-boot-cloudfoundry/src/main/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/reactive/CloudFoundryReactiveHealthEndpointWebExtension.java
  24. 10
      module/spring-boot-cloudfoundry/src/main/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/servlet/CloudFoundryActuatorAutoConfiguration.java
  25. 6
      module/spring-boot-cloudfoundry/src/main/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/servlet/CloudFoundryHealthEndpointWebExtension.java
  26. 4
      module/spring-boot-cloudfoundry/src/test/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/CloudFoundryWebEndpointDiscovererTests.java
  27. 7
      module/spring-boot-cloudfoundry/src/test/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/reactive/CloudFoundryReactiveActuatorAutoConfigurationTests.java
  28. 8
      module/spring-boot-cloudfoundry/src/test/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/reactive/CloudFoundryReactiveHealthEndpointWebExtensionTests.java
  29. 2
      module/spring-boot-cloudfoundry/src/test/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/servlet/CloudFoundryActuatorAutoConfigurationTests.java
  30. 8
      module/spring-boot-cloudfoundry/src/test/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/servlet/CloudFoundryHealthEndpointWebExtensionTests.java
  31. 2
      module/spring-boot-cloudfoundry/src/test/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/servlet/CloudFoundryInfoEndpointWebExtensionTests.java
  32. 6
      module/spring-boot-health/build.gradle
  33. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/AdditionalHealthEndpointPath.java
  34. 2
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/CompositeHealthDescriptor.java
  35. 2
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/Contributor.java
  36. 2
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthDescriptor.java
  37. 5
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpoint.java
  38. 5
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointGroup.java
  39. 6
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointGroups.java
  40. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointGroupsPostProcessor.java
  41. 2
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointSupport.java
  42. 5
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointWebExtension.java
  43. 2
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointWebExtensionRuntimeHints.java
  44. 5
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HttpCodeStatusMapper.java
  45. 2
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/IndicatedHealthDescriptor.java
  46. 5
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/ReactiveHealthEndpointWebExtension.java
  47. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/SimpleHttpCodeStatusMapper.java
  48. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/SimpleStatusAggregator.java
  49. 5
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/StatusAggregator.java
  50. 2
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/SystemHealthDescriptor.java
  51. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/package-info.java
  52. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/application/AvailabilityStateHealthIndicator.java
  53. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/application/DiskSpaceHealthIndicator.java
  54. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/application/LivenessStateHealthIndicator.java
  55. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/application/ReadinessStateHealthIndicator.java
  56. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/application/SslHealthIndicator.java
  57. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/application/package-info.java
  58. 10
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/AutoConfiguredHealthEndpointGroup.java
  59. 22
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/AutoConfiguredHealthEndpointGroups.java
  60. 12
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/AvailabilityProbesAutoConfiguration.java
  61. 10
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/AvailabilityProbesHealthEndpointGroup.java
  62. 10
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/AvailabilityProbesHealthEndpointGroups.java
  63. 6
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/AvailabilityProbesHealthEndpointGroupsPostProcessor.java
  64. 10
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/DelegatingAvailabilityProbesHealthEndpointGroup.java
  65. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/GroupsHealthContributorNameValidator.java
  66. 13
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/HealthEndpointAutoConfiguration.java
  67. 16
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/HealthEndpointConfiguration.java
  68. 6
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/HealthEndpointProperties.java
  69. 8
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/HealthEndpointReactiveWebExtensionConfiguration.java
  70. 8
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/HealthEndpointWebExtensionConfiguration.java
  71. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/HealthProperties.java
  72. 2
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/IncludeExcludeGroupMemberPredicate.java
  73. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/NoSuchHealthContributorFailureAnalyzer.java
  74. 4
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/package-info.java
  75. 10
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/application/AvailabilityHealthContributorAutoConfiguration.java
  76. 10
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/application/DiskSpaceHealthContributorAutoConfiguration.java
  77. 6
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/application/DiskSpaceHealthIndicatorProperties.java
  78. 10
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/application/SslHealthContributorAutoConfiguration.java
  79. 6
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/application/SslHealthIndicatorProperties.java
  80. 5
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/application/package-info.java
  81. 2
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/contributor/AbstractCompositeHealthContributorConfiguration.java
  82. 2
      module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/registry/HealthContributorRegistryAutoConfiguration.java
  83. 110
      module/spring-boot-health/src/main/resources/META-INF/additional-spring-configuration-metadata.json
  84. 3
      module/spring-boot-health/src/main/resources/META-INF/spring.factories
  85. 5
      module/spring-boot-health/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  86. 2
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/AdditionalHealthEndpointPathTests.java
  87. 2
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/CompositeHealthDescriptorTests.java
  88. 2
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointGroupsTests.java
  89. 4
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointSupportTests.java
  90. 4
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointTests.java
  91. 2
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointWebExtensionRuntimeHintsTests.java
  92. 4
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointWebExtensionTests.java
  93. 2
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/IndicatedHealthDescriptorTests.java
  94. 4
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/ReactiveHealthEndpointWebExtensionTests.java
  95. 2
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/ReactiveHealthIndicatorImplementationTests.java
  96. 2
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/SimpleHttpCodeStatusMapperTests.java
  97. 2
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/SimpleStatusAggregatorTests.java
  98. 2
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/SystemHealthDescriptorTests.java
  99. 2
      module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/TestHealthEndpointGroup.java
  100. 2
      module/spring-boot-health/src/test/java/org/springframework/boot/health/application/AvailabilityStateHealthIndicatorTests.java
  101. Some files were not shown because too many files have changed in this diff Show More

18
documentation/spring-boot-actuator-docs/src/test/java/org/springframework/boot/actuate/docs/health/HealthEndpointDocumentationTests.java

@ -28,16 +28,16 @@ import org.junit.jupiter.api.Test; @@ -28,16 +28,16 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.docs.MockMvcEndpointDocumentationTests;
import org.springframework.boot.actuate.endpoint.SecurityContext;
import org.springframework.boot.actuate.health.AdditionalHealthEndpointPath;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.HealthEndpointGroup;
import org.springframework.boot.actuate.health.HealthEndpointGroups;
import org.springframework.boot.actuate.health.HttpCodeStatusMapper;
import org.springframework.boot.actuate.health.SimpleHttpCodeStatusMapper;
import org.springframework.boot.actuate.health.SimpleStatusAggregator;
import org.springframework.boot.actuate.health.StatusAggregator;
import org.springframework.boot.actuate.system.DiskSpaceHealthIndicator;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.health.actuate.endpoint.AdditionalHealthEndpointPath;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroup;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroups;
import org.springframework.boot.health.actuate.endpoint.HttpCodeStatusMapper;
import org.springframework.boot.health.actuate.endpoint.SimpleHttpCodeStatusMapper;
import org.springframework.boot.health.actuate.endpoint.SimpleStatusAggregator;
import org.springframework.boot.health.actuate.endpoint.StatusAggregator;
import org.springframework.boot.health.application.DiskSpaceHealthIndicator;
import org.springframework.boot.health.autoconfigure.registry.HealthContributorNameGenerator;
import org.springframework.boot.health.contributor.CompositeHealthContributor;
import org.springframework.boot.health.contributor.Health;

12
documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/endpoints.adoc

@ -618,7 +618,7 @@ with the `key` listed in the following table: @@ -618,7 +618,7 @@ with the `key` listed in the following table:
| Checks that a connection to javadoc:javax.sql.DataSource[] can be obtained.
| `diskspace`
| javadoc:org.springframework.boot.actuate.system.DiskSpaceHealthIndicator[]
| javadoc:org.springframework.boot.health.info.DiskSpaceHealthIndicator[]
| Checks for low disk space.
| `elasticsearch`
@ -662,7 +662,7 @@ with the `key` listed in the following table: @@ -662,7 +662,7 @@ with the `key` listed in the following table:
| Checks that a Redis server is up.
| `ssl`
| javadoc:org.springframework.boot.actuate.ssl.SslHealthIndicator[]
| javadoc:org.springframework.boot.health.info.SslHealthIndicator[]
| Checks that SSL certificates are ok.
|===
@ -679,11 +679,11 @@ Additional javadoc:org.springframework.boot.actuate.health.HealthIndicator[] bea @@ -679,11 +679,11 @@ Additional javadoc:org.springframework.boot.actuate.health.HealthIndicator[] bea
| Key | Name | Description
| `livenessstate`
| javadoc:org.springframework.boot.actuate.availability.LivenessStateHealthIndicator[]
| javadoc:org.springframework.boot.health.application.LivenessStateHealthIndicator[]
| Exposes the "`Liveness`" application availability state.
| `readinessstate`
| javadoc:org.springframework.boot.actuate.availability.ReadinessStateHealthIndicator[]
| javadoc:org.springframework.boot.health.application.ReadinessStateHealthIndicator[]
| Exposes the "`Readiness`" application availability state.
|===
@ -928,7 +928,7 @@ Applications deployed on Kubernetes can provide information about their internal @@ -928,7 +928,7 @@ Applications deployed on Kubernetes can provide information about their internal
Depending on https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/[your Kubernetes configuration], the kubelet calls those probes and reacts to the result.
By default, Spring Boot manages your xref:features/spring-application.adoc#features.spring-application.application-availability[Application Availability] state.
If deployed in a Kubernetes environment, actuator gathers the "`Liveness`" and "`Readiness`" information from the javadoc:org.springframework.boot.availability.ApplicationAvailability[] interface and uses that information in dedicated xref:actuator/endpoints.adoc#actuator.endpoints.health.auto-configured-health-indicators[health indicators]: javadoc:org.springframework.boot.actuate.availability.LivenessStateHealthIndicator[] and javadoc:org.springframework.boot.actuate.availability.ReadinessStateHealthIndicator[].
If deployed in a Kubernetes environment, actuator gathers the "`Liveness`" and "`Readiness`" information from the javadoc:org.springframework.boot.availability.ApplicationAvailability[] interface and uses that information in dedicated xref:actuator/endpoints.adoc#actuator.endpoints.health.auto-configured-health-indicators[health indicators]: javadoc:org.springframework.boot.health.application.LivenessStateHealthIndicator[] and javadoc:org.springframework.boot.health.application.ReadinessStateHealthIndicator[].
These indicators are shown on the global health endpoint (`"/actuator/health"`).
They are also exposed as separate HTTP Probes by using xref:actuator/endpoints.adoc#actuator.endpoints.health.groups[health groups]: `"/actuator/health/liveness"` and `"/actuator/health/readiness"`.
@ -1255,7 +1255,7 @@ The `info` endpoint publishes information about your process, see javadoc:org.sp @@ -1255,7 +1255,7 @@ The `info` endpoint publishes information about your process, see javadoc:org.sp
[[actuator.endpoints.info.ssl-information]]
=== SSL Information
The `info` endpoint publishes information about your SSL certificates (that are configured through xref:features/ssl.adoc#features.ssl.bundles[SSL Bundles]), see javadoc:org.springframework.boot.info.SslInfo[] for more details. This endpoint reuses the "warning threshold" property of javadoc:org.springframework.boot.actuate.ssl.SslHealthIndicator[]: if an SSL certificate will be invalid within the time span defined by this threshold, it will trigger a warning. See the `management.health.ssl.certificate-validity-warning-threshold` property.
The `info` endpoint publishes information about your SSL certificates (that are configured through xref:features/ssl.adoc#features.ssl.bundles[SSL Bundles]), see javadoc:org.springframework.boot.info.SslInfo[] for more details. This endpoint reuses the "warning threshold" property of javadoc:org.springframework.boot.health.info.SslHealthIndicator[]: if an SSL certificate will be invalid within the time span defined by this threshold, it will trigger a warning. See the `management.health.ssl.certificate-validity-warning-threshold` property.

2
documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/howto/actuator/maphealthindicatorstometrics/MyHealthMetricsExportConfiguration.java

@ -19,7 +19,7 @@ package org.springframework.boot.docs.howto.actuator.maphealthindicatorstometric @@ -19,7 +19,7 @@ package org.springframework.boot.docs.howto.actuator.maphealthindicatorstometric
import io.micrometer.core.instrument.Gauge;
import io.micrometer.core.instrument.MeterRegistry;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.contributor.Status;
import org.springframework.context.annotation.Configuration;

2
documentation/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/howto/actuator/maphealthindicatorstometrics/MyHealthMetricsExportConfiguration.kt

@ -18,7 +18,7 @@ package org.springframework.boot.docs.howto.actuator.maphealthindicatorstometric @@ -18,7 +18,7 @@ package org.springframework.boot.docs.howto.actuator.maphealthindicatorstometric
import io.micrometer.core.instrument.Gauge
import io.micrometer.core.instrument.MeterRegistry
import org.springframework.boot.actuate.health.HealthEndpoint
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint
import org.springframework.boot.health.contributor.Status
import org.springframework.context.annotation.Configuration

2
documentation/spring-boot-docs/src/test/java/org/springframework/boot/docs/howto/actuator/maphealthindicatorstometrics/MetricsHealthMicrometerExportTests.java

@ -22,8 +22,8 @@ import io.micrometer.core.instrument.simple.SimpleMeterRegistry; @@ -22,8 +22,8 @@ import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointAutoConfiguration;
import org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration;
import org.springframework.boot.health.autoconfigure.registry.HealthContributorRegistryAutoConfiguration;
import org.springframework.boot.health.contributor.Health;

1
integration-test/spring-boot-actuator-integration-tests/build.gradle

@ -24,6 +24,7 @@ description = "Spring Boot Actuator Integration Tests" @@ -24,6 +24,7 @@ description = "Spring Boot Actuator Integration Tests"
dependencies {
testImplementation(project(":module:spring-boot-actuator"))
testImplementation(project(":module:spring-boot-actuator-autoconfigure"))
testImplementation(project(":core:spring-boot-autoconfigure"))
testImplementation(project(":module:spring-boot-health"))
testImplementation(project(":module:spring-boot-http-converter"))

0
module/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointAccessIntegrationTests.java → integration-test/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointAccessIntegrationTests.java

2
module/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointIntegrationTests.java → integration-test/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointIntegrationTests.java

@ -31,10 +31,10 @@ import org.springframework.boot.actuate.audit.InMemoryAuditEventRepository; @@ -31,10 +31,10 @@ import org.springframework.boot.actuate.audit.InMemoryAuditEventRepository;
import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.context.ShutdownEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration;
import org.springframework.boot.actuate.web.exchanges.InMemoryHttpExchangeRepository;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointAutoConfiguration;
import org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration;
import org.springframework.boot.health.autoconfigure.registry.HealthContributorRegistryAutoConfiguration;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;

4
module/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointsAutoConfigurationIntegrationTests.java → integration-test/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointsAutoConfigurationIntegrationTests.java

@ -19,10 +19,10 @@ package org.springframework.boot.actuate.autoconfigure.endpoint.web; @@ -19,10 +19,10 @@ package org.springframework.boot.actuate.autoconfigure.endpoint.web;
import org.junit.jupiter.api.Test;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.actuate.health.HealthEndpointWebExtension;
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.context.annotation.UserConfigurations;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointWebExtension;
import org.springframework.boot.health.actuate.endpoint.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;

4
integration-test/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/health/HealthEndpointWebIntegrationTests.java

@ -27,6 +27,10 @@ import org.springframework.boot.actuate.endpoint.ApiVersion; @@ -27,6 +27,10 @@ import org.springframework.boot.actuate.endpoint.ApiVersion;
import org.springframework.boot.actuate.endpoint.web.test.WebEndpointTest;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroups;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointWebExtension;
import org.springframework.boot.health.actuate.endpoint.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.health.autoconfigure.registry.HealthContributorNameGenerator;
import org.springframework.boot.health.contributor.CompositeHealthContributor;
import org.springframework.boot.health.contributor.CompositeReactiveHealthContributor;

7
integration-test/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/health/TestHealthEndpointGroup.java

@ -19,6 +19,13 @@ package org.springframework.boot.actuate.health; @@ -19,6 +19,13 @@ package org.springframework.boot.actuate.health;
import java.util.function.Predicate;
import org.springframework.boot.actuate.endpoint.SecurityContext;
import org.springframework.boot.health.actuate.endpoint.AdditionalHealthEndpointPath;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroup;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroups;
import org.springframework.boot.health.actuate.endpoint.HttpCodeStatusMapper;
import org.springframework.boot.health.actuate.endpoint.SimpleHttpCodeStatusMapper;
import org.springframework.boot.health.actuate.endpoint.SimpleStatusAggregator;
import org.springframework.boot.health.actuate.endpoint.StatusAggregator;
/**
* Test implementation of {@link HealthEndpointGroups}.

1
module/spring-boot-actuator-autoconfigure/build.gradle

@ -31,7 +31,6 @@ dependencies { @@ -31,7 +31,6 @@ dependencies {
implementation("tools.jackson.core:jackson-databind")
optional(project(":module:spring-boot-health"))
optional(project(":module:spring-boot-web-server"))
optional("io.micrometer:micrometer-core")
optional("io.projectreactor:reactor-core")

24
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/availability/package-info.java

@ -1,24 +0,0 @@ @@ -1,24 +0,0 @@
/*
* Copyright 2012-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Auto-configuration that extends health endpoints so that they can be used as
* availability probes.
*/
@NullMarked
package org.springframework.boot.actuate.autoconfigure.availability;
import org.jspecify.annotations.NullMarked;

23
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/package-info.java

@ -1,23 +0,0 @@ @@ -1,23 +0,0 @@
/*
* Copyright 2012-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Auto-configuration for actuator health concerns.
*/
@NullMarked
package org.springframework.boot.actuate.autoconfigure.health;
import org.jspecify.annotations.NullMarked;

23
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/system/package-info.java

@ -1,23 +0,0 @@ @@ -1,23 +0,0 @@
/*
* Copyright 2012-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Auto-configuration for actuator system concerns.
*/
@NullMarked
package org.springframework.boot.actuate.autoconfigure.system;
import org.jspecify.annotations.NullMarked;

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

@ -24,33 +24,6 @@ @@ -24,33 +24,6 @@
"description": "Whether to skip SSL verification for Cloud Foundry actuator endpoint security calls.",
"defaultValue": false
},
{
"name": "management.endpoint.health.probes.add-additional-paths",
"type": "java.lang.Boolean",
"description": "Whether to make the liveness and readiness health groups available on the main server port.",
"defaultValue": false
},
{
"name": "management.endpoint.health.probes.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable liveness and readiness probes.",
"defaultValue": true
},
{
"name": "management.endpoint.health.status.order",
"defaultValue": [
"DOWN",
"OUT_OF_SERVICE",
"UP",
"UNKNOWN"
]
},
{
"name": "management.endpoint.health.validate-group-membership",
"type": "java.lang.Boolean",
"description": "Whether to validate health group membership on startup. Validation fails if a group includes or excludes a health contributor that does not exist.",
"defaultValue": true
},
{
"name": "management.endpoints.access.default",
"type": "org.springframework.boot.actuate.endpoint.Access",
@ -99,60 +72,6 @@ @@ -99,60 +72,6 @@
"health"
]
},
{
"name": "management.health.defaults.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable default health indicators.",
"defaultValue": true
},
{
"name": "management.health.diskspace.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable disk space health check.",
"defaultValue": true
},
{
"name": "management.health.influxdb.enabled",
"type": "java.lang.Boolean",
"deprecation": {
"level": "error",
"reason": "InfluxDB support has been removed."
}
},
{
"name": "management.health.livenessstate.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable liveness state health check.",
"defaultValue": false
},
{
"name": "management.health.ping.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable ping health check.",
"defaultValue": true
},
{
"name": "management.health.probes.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable liveness and readiness probes.",
"defaultValue": false,
"deprecation": {
"level": "error",
"replacement": "management.endpoint.health.probes.enabled"
}
},
{
"name": "management.health.readinessstate.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable readiness state health check.",
"defaultValue": false
},
{
"name": "management.health.ssl.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable SSL certificate health check.",
"defaultValue": true
},
{
"name": "management.httpexchanges.recording.enabled",
"type": "java.lang.Boolean",
@ -482,28 +401,6 @@ @@ -482,28 +401,6 @@
"name": "any"
}
]
},
{
"name": "management.health.status.order",
"values": [
{
"value": "UNKNOWN"
},
{
"value": "UP"
},
{
"value": "DOWN"
},
{
"value": "OUT_OF_SERVICE"
}
],
"providers": [
{
"name": "any"
}
]
}
]
}

3
module/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/spring.factories

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
# Failure Analyzers
org.springframework.boot.diagnostics.FailureAnalyzer=\
org.springframework.boot.actuate.autoconfigure.health.NoSuchHealthContributorFailureAnalyzer

5
module/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

@ -1,7 +1,5 @@ @@ -1,7 +1,5 @@
org.springframework.boot.actuate.autoconfigure.audit.AuditAutoConfiguration
org.springframework.boot.actuate.autoconfigure.audit.AuditEventsEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.availability.AvailabilityHealthContributorAutoConfiguration
org.springframework.boot.actuate.autoconfigure.availability.AvailabilityProbesAutoConfiguration
org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.context.ShutdownEndpointAutoConfiguration
@ -11,7 +9,6 @@ org.springframework.boot.actuate.autoconfigure.endpoint.jackson.JacksonEndpointA @@ -11,7 +9,6 @@ org.springframework.boot.actuate.autoconfigure.endpoint.jackson.JacksonEndpointA
org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.info.InfoContributorAutoConfiguration
org.springframework.boot.actuate.autoconfigure.info.InfoEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.logging.LogFileWebEndpointAutoConfiguration
@ -20,9 +17,7 @@ org.springframework.boot.actuate.autoconfigure.management.HeapDumpWebEndpointAut @@ -20,9 +17,7 @@ org.springframework.boot.actuate.autoconfigure.management.HeapDumpWebEndpointAut
org.springframework.boot.actuate.autoconfigure.management.ThreadDumpEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.sbom.SbomEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.scheduling.ScheduledTasksEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.ssl.SslHealthContributorAutoConfiguration
org.springframework.boot.actuate.autoconfigure.startup.StartupEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.system.DiskSpaceHealthContributorAutoConfiguration
org.springframework.boot.actuate.autoconfigure.web.exchanges.HttpExchangesEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.web.mappings.MappingsEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration

1
module/spring-boot-actuator/build.gradle

@ -27,7 +27,6 @@ description = "Spring Boot Actuator" @@ -27,7 +27,6 @@ description = "Spring Boot Actuator"
dependencies {
api(project(":core:spring-boot"))
optional(project(":module:spring-boot-health"))
optional("com.github.ben-manes.caffeine:caffeine")
optional("com.google.code.findbugs:jsr305")
optional("com.zaxxer:HikariCP")

23
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/system/package-info.java

@ -1,23 +0,0 @@ @@ -1,23 +0,0 @@
/*
* Copyright 2012-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Actuator support for system-related concerns.
*/
@NullMarked
package org.springframework.boot.actuate.system;
import org.jspecify.annotations.NullMarked;

2
module/spring-boot-cloudfoundry/src/main/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/CloudFoundryWebEndpointDiscoverer.java

@ -34,8 +34,8 @@ import org.springframework.boot.actuate.endpoint.web.PathMapper; @@ -34,8 +34,8 @@ import org.springframework.boot.actuate.endpoint.web.PathMapper;
import org.springframework.boot.actuate.endpoint.web.WebOperation;
import org.springframework.boot.actuate.endpoint.web.annotation.EndpointWebExtension;
import org.springframework.boot.actuate.endpoint.web.annotation.WebEndpointDiscoverer;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.cloudfoundry.autoconfigure.actuate.endpoint.CloudFoundryWebEndpointDiscoverer.CloudFoundryWebEndpointDiscovererRuntimeHints;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ImportRuntimeHints;
import org.springframework.core.annotation.MergedAnnotations;

8
module/spring-boot-cloudfoundry/src/main/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/reactive/CloudFoundryReactiveActuatorAutoConfiguration.java

@ -29,7 +29,6 @@ import org.springframework.beans.BeansException; @@ -29,7 +29,6 @@ import org.springframework.beans.BeansException;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.info.InfoEndpointAutoConfiguration;
import org.springframework.boot.actuate.endpoint.ExposableEndpoint;
import org.springframework.boot.actuate.endpoint.invoke.ParameterValueMapper;
@ -37,8 +36,6 @@ import org.springframework.boot.actuate.endpoint.web.EndpointMapping; @@ -37,8 +36,6 @@ import org.springframework.boot.actuate.endpoint.web.EndpointMapping;
import org.springframework.boot.actuate.endpoint.web.EndpointMediaTypes;
import org.springframework.boot.actuate.endpoint.web.ExposableWebEndpoint;
import org.springframework.boot.actuate.endpoint.web.PathMappedEndpoints;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.actuate.info.GitInfoContributor;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframework.boot.actuate.info.InfoEndpoint;
@ -55,6 +52,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplicat @@ -55,6 +52,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplicat
import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.boot.cloudfoundry.autoconfigure.actuate.endpoint.CloudFoundryWebEndpointDiscoverer;
import org.springframework.boot.cloudfoundry.autoconfigure.actuate.endpoint.servlet.CloudFoundryInfoEndpointWebExtension;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.info.GitProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
@ -78,7 +77,8 @@ import org.springframework.web.server.WebFilter; @@ -78,7 +77,8 @@ import org.springframework.web.server.WebFilter;
* @author Madhura Bhave
* @since 4.0.0
*/
@AutoConfiguration(after = { HealthEndpointAutoConfiguration.class, InfoEndpointAutoConfiguration.class })
@AutoConfiguration(after = InfoEndpointAutoConfiguration.class,
afterName = "org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointAutoConfiguration")
@ConditionalOnBooleanProperty(name = "management.cloudfoundry.enabled", matchIfMissing = true)
@ConditionalOnWebApplication(type = Type.REACTIVE)
@ConditionalOnCloudPlatform(CloudPlatform.CLOUD_FOUNDRY)

6
module/spring-boot-cloudfoundry/src/main/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/reactive/CloudFoundryReactiveHealthEndpointWebExtension.java

@ -25,10 +25,10 @@ import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; @@ -25,10 +25,10 @@ import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.boot.actuate.endpoint.annotation.Selector;
import org.springframework.boot.actuate.endpoint.annotation.Selector.Match;
import org.springframework.boot.actuate.endpoint.web.WebEndpointResponse;
import org.springframework.boot.actuate.health.HealthDescriptor;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.cloudfoundry.autoconfigure.actuate.endpoint.EndpointCloudFoundryExtension;
import org.springframework.boot.health.actuate.endpoint.HealthDescriptor;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.ReactiveHealthEndpointWebExtension;
/**
* Reactive {@link EndpointExtension @EndpointExtension} for the {@link HealthEndpoint}

10
module/spring-boot-cloudfoundry/src/main/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/servlet/CloudFoundryActuatorAutoConfiguration.java

@ -26,7 +26,6 @@ import org.jspecify.annotations.Nullable; @@ -26,7 +26,6 @@ import org.jspecify.annotations.Nullable;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.info.InfoEndpointAutoConfiguration;
import org.springframework.boot.actuate.endpoint.ExposableEndpoint;
import org.springframework.boot.actuate.endpoint.invoke.ParameterValueMapper;
@ -34,8 +33,6 @@ import org.springframework.boot.actuate.endpoint.web.EndpointMapping; @@ -34,8 +33,6 @@ import org.springframework.boot.actuate.endpoint.web.EndpointMapping;
import org.springframework.boot.actuate.endpoint.web.EndpointMediaTypes;
import org.springframework.boot.actuate.endpoint.web.ExposableWebEndpoint;
import org.springframework.boot.actuate.endpoint.web.PathMappedEndpoints;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.HealthEndpointWebExtension;
import org.springframework.boot.actuate.info.GitInfoContributor;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframework.boot.actuate.info.InfoEndpoint;
@ -51,6 +48,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplicat @@ -51,6 +48,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplicat
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.boot.cloudfoundry.autoconfigure.actuate.endpoint.CloudFoundryWebEndpointDiscoverer;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointWebExtension;
import org.springframework.boot.info.GitProperties;
import org.springframework.boot.restclient.RestTemplateBuilder;
import org.springframework.context.ApplicationContext;
@ -78,8 +77,9 @@ import org.springframework.web.servlet.DispatcherServlet; @@ -78,8 +77,9 @@ import org.springframework.web.servlet.DispatcherServlet;
* @author Madhura Bhave
* @since 4.0.0
*/
@AutoConfiguration(after = { HealthEndpointAutoConfiguration.class, InfoEndpointAutoConfiguration.class },
afterName = "org.springframework.boot.servlet.autoconfigure.actuate.web.ServletManagementContextAutoConfiguration")
@AutoConfiguration(after = InfoEndpointAutoConfiguration.class, afterName = {
"org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointAutoConfiguration",
"org.springframework.boot.servlet.autoconfigure.actuate.web.ServletManagementContextAutoConfiguration" })
@ConditionalOnBooleanProperty(name = "management.cloudfoundry.enabled", matchIfMissing = true)
@ConditionalOnWebApplication(type = Type.SERVLET)
@ConditionalOnClass(DispatcherServlet.class)

6
module/spring-boot-cloudfoundry/src/main/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/servlet/CloudFoundryHealthEndpointWebExtension.java

@ -23,10 +23,10 @@ import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; @@ -23,10 +23,10 @@ import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.boot.actuate.endpoint.annotation.Selector;
import org.springframework.boot.actuate.endpoint.annotation.Selector.Match;
import org.springframework.boot.actuate.endpoint.web.WebEndpointResponse;
import org.springframework.boot.actuate.health.HealthDescriptor;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.HealthEndpointWebExtension;
import org.springframework.boot.cloudfoundry.autoconfigure.actuate.endpoint.EndpointCloudFoundryExtension;
import org.springframework.boot.health.actuate.endpoint.HealthDescriptor;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointWebExtension;
/**
* {@link EndpointExtension @EndpointExtension} for the {@link HealthEndpoint} that always

4
module/spring-boot-cloudfoundry/src/test/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/CloudFoundryWebEndpointDiscovererTests.java

@ -39,9 +39,9 @@ import org.springframework.boot.actuate.endpoint.web.ExposableWebEndpoint; @@ -39,9 +39,9 @@ import org.springframework.boot.actuate.endpoint.web.ExposableWebEndpoint;
import org.springframework.boot.actuate.endpoint.web.PathMapper;
import org.springframework.boot.actuate.endpoint.web.WebOperation;
import org.springframework.boot.actuate.endpoint.web.annotation.EndpointWebExtension;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.HealthEndpointGroups;
import org.springframework.boot.cloudfoundry.autoconfigure.actuate.endpoint.CloudFoundryWebEndpointDiscoverer.CloudFoundryWebEndpointDiscovererRuntimeHints;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroups;
import org.springframework.boot.health.registry.HealthContributorRegistry;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;

7
module/spring-boot-cloudfoundry/src/test/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/reactive/CloudFoundryReactiveActuatorAutoConfigurationTests.java

@ -35,7 +35,6 @@ import reactor.netty.http.HttpResources; @@ -35,7 +35,6 @@ import reactor.netty.http.HttpResources;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.info.InfoContributorAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.info.InfoEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration;
@ -50,6 +49,7 @@ import org.springframework.boot.autoconfigure.AutoConfigurations; @@ -50,6 +49,7 @@ import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration;
import org.springframework.boot.cloudfoundry.autoconfigure.actuate.endpoint.servlet.CloudFoundryInfoEndpointWebExtension;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointAutoConfiguration;
import org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration;
import org.springframework.boot.health.autoconfigure.registry.HealthContributorRegistryAutoConfiguration;
import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration;
@ -260,7 +260,10 @@ class CloudFoundryReactiveActuatorAutoConfigurationTests { @@ -260,7 +260,10 @@ class CloudFoundryReactiveActuatorAutoConfigurationTests {
"vcap.application.cf_api:https://my-cloud-controller.com")
.run((context) -> {
Collection<ExposableWebEndpoint> endpoints = getHandlerMapping(context).getEndpoints();
ExposableWebEndpoint endpoint = endpoints.iterator().next();
ExposableWebEndpoint endpoint = endpoints.stream()
.filter((candidate) -> candidate.getEndpointId().toLowerCaseString().equals("health"))
.findFirst()
.get();
assertThat(endpoint.getOperations()).hasSize(2);
WebOperation webOperation = findOperationWithRequestPath(endpoint, "health");
assertThat(webOperation).extracting("invoker")

8
module/spring-boot-cloudfoundry/src/test/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/reactive/CloudFoundryReactiveHealthEndpointWebExtensionTests.java

@ -23,15 +23,15 @@ import org.junit.jupiter.api.Test; @@ -23,15 +23,15 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration;
import org.springframework.boot.actuate.endpoint.ApiVersion;
import org.springframework.boot.actuate.endpoint.web.WebEndpointResponse;
import org.springframework.boot.actuate.health.CompositeHealthDescriptor;
import org.springframework.boot.actuate.health.HealthDescriptor;
import org.springframework.boot.actuate.health.IndicatedHealthDescriptor;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.health.actuate.endpoint.CompositeHealthDescriptor;
import org.springframework.boot.health.actuate.endpoint.HealthDescriptor;
import org.springframework.boot.health.actuate.endpoint.IndicatedHealthDescriptor;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointAutoConfiguration;
import org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration;
import org.springframework.boot.health.autoconfigure.registry.HealthContributorRegistryAutoConfiguration;
import org.springframework.boot.health.contributor.Health;

2
module/spring-boot-cloudfoundry/src/test/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/servlet/CloudFoundryActuatorAutoConfigurationTests.java

@ -25,7 +25,6 @@ import org.junit.jupiter.api.Test; @@ -25,7 +25,6 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration;
import org.springframework.boot.actuate.endpoint.ApiVersion;
import org.springframework.boot.actuate.endpoint.EndpointId;
@ -38,6 +37,7 @@ import org.springframework.boot.actuate.endpoint.web.WebOperation; @@ -38,6 +37,7 @@ import org.springframework.boot.actuate.endpoint.web.WebOperation;
import org.springframework.boot.actuate.endpoint.web.WebOperationRequestPredicate;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointAutoConfiguration;
import org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration;
import org.springframework.boot.health.autoconfigure.registry.HealthContributorRegistryAutoConfiguration;
import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration;

8
module/spring-boot-cloudfoundry/src/test/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/servlet/CloudFoundryHealthEndpointWebExtensionTests.java

@ -22,14 +22,14 @@ import org.junit.jupiter.api.Test; @@ -22,14 +22,14 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration;
import org.springframework.boot.actuate.endpoint.ApiVersion;
import org.springframework.boot.actuate.health.CompositeHealthDescriptor;
import org.springframework.boot.actuate.health.HealthDescriptor;
import org.springframework.boot.actuate.health.IndicatedHealthDescriptor;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.health.actuate.endpoint.CompositeHealthDescriptor;
import org.springframework.boot.health.actuate.endpoint.HealthDescriptor;
import org.springframework.boot.health.actuate.endpoint.IndicatedHealthDescriptor;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointAutoConfiguration;
import org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration;
import org.springframework.boot.health.autoconfigure.registry.HealthContributorRegistryAutoConfiguration;
import org.springframework.boot.health.contributor.Health;

2
module/spring-boot-cloudfoundry/src/test/java/org/springframework/boot/cloudfoundry/autoconfigure/actuate/endpoint/servlet/CloudFoundryInfoEndpointWebExtensionTests.java

@ -22,13 +22,13 @@ import org.junit.jupiter.api.Test; @@ -22,13 +22,13 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.info.InfoContributorAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.info.InfoEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointAutoConfiguration;
import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration;
import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration;

6
module/spring-boot-health/build.gradle

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
plugins {
id "java-library"
id "org.springframework.boot.auto-configuration"
id "org.springframework.boot.configuration-properties"
id "org.springframework.boot.deployed"
id "org.springframework.boot.optional-dependencies"
}
@ -29,6 +30,7 @@ dependencies { @@ -29,6 +30,7 @@ dependencies {
compileOnly("com.google.code.findbugs:jsr305")
optional(project(":core:spring-boot-autoconfigure"))
optional(project(":module:spring-boot-actuator-autoconfigure"))
optional("io.projectreactor:reactor-core")
optional("com.fasterxml.jackson.core:jackson-annotations")
@ -36,10 +38,14 @@ dependencies { @@ -36,10 +38,14 @@ dependencies {
testImplementation(project(":test-support:spring-boot-test-support"))
testImplementation("io.projectreactor:reactor-test")
testImplementation("tools.jackson.core:jackson-databind")
testImplementation("org.springframework.security:spring-security-core")
testImplementation("org.springframework:spring-web")
testImplementation("org.springframework:spring-webflux")
testCompileOnly("com.google.code.findbugs:jsr305")
testRuntimeOnly("ch.qos.logback:logback-classic")
testRuntimeOnly("jakarta.servlet:jakarta.servlet-api")
}
tasks.named("compileTestJava") {

4
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/AdditionalHealthEndpointPath.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/AdditionalHealthEndpointPath.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import org.jspecify.annotations.Nullable;
@ -27,7 +27,7 @@ import org.springframework.util.StringUtils; @@ -27,7 +27,7 @@ import org.springframework.util.StringUtils;
*
* @author Phillip Webb
* @author Madhura Bhave
* @since 2.6.0
* @since 4.0.0
*/
public final class AdditionalHealthEndpointPath {

2
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/CompositeHealthDescriptor.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/CompositeHealthDescriptor.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.Map;
import java.util.TreeMap;

2
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/Contributor.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/Contributor.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.Iterator;

2
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthDescriptor.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthDescriptor.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

5
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpoint.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpoint.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.time.Duration;
import java.util.Map;
@ -41,7 +41,7 @@ import org.springframework.boot.health.registry.ReactiveHealthContributorRegistr @@ -41,7 +41,7 @@ import org.springframework.boot.health.registry.ReactiveHealthContributorRegistr
* @author Andy Wilkinson
* @author Stephane Nicoll
* @author Scott Frederick
* @since 2.0.0
* @since 4.0.0
*/
@Endpoint(id = "health")
public class HealthEndpoint extends HealthEndpointSupport<Health, HealthDescriptor> {
@ -58,7 +58,6 @@ public class HealthEndpoint extends HealthEndpointSupport<Health, HealthDescript @@ -58,7 +58,6 @@ public class HealthEndpoint extends HealthEndpointSupport<Health, HealthDescript
* @param groups the health endpoint groups
* @param slowContributorLoggingThreshold duration after which slow health indicator
* logging should occur
* @since 4.0.0
*/
public HealthEndpoint(HealthContributorRegistry registry,
@Nullable ReactiveHealthContributorRegistry fallbackRegistry, HealthEndpointGroups groups,

5
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpointGroup.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointGroup.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import org.jspecify.annotations.Nullable;
@ -28,7 +28,7 @@ import org.springframework.boot.health.contributor.HealthContributor; @@ -28,7 +28,7 @@ import org.springframework.boot.health.contributor.HealthContributor;
*
* @author Phillip Webb
* @author Madhura Bhave
* @since 2.2.0
* @since 4.0.0
*/
public interface HealthEndpointGroup {
@ -71,7 +71,6 @@ public interface HealthEndpointGroup { @@ -71,7 +71,6 @@ public interface HealthEndpointGroup {
* Return an additional path that can be used to map the health group to an
* alternative location.
* @return the additional health path or {@code null}
* @since 2.6.0
*/
@Nullable AdditionalHealthEndpointPath getAdditionalPath();

6
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpointGroups.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointGroups.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.LinkedHashSet;
import java.util.Map;
@ -29,7 +29,7 @@ import org.springframework.util.Assert; @@ -29,7 +29,7 @@ import org.springframework.util.Assert;
* A collection of {@link HealthEndpointGroup groups} for use with a health endpoint.
*
* @author Phillip Webb
* @since 2.2.0
* @since 4.0.0
*/
public interface HealthEndpointGroups {
@ -57,7 +57,6 @@ public interface HealthEndpointGroups { @@ -57,7 +57,6 @@ public interface HealthEndpointGroups {
* with that path is found.
* @param path the additional path
* @return the matching {@link HealthEndpointGroup} or {@code null}
* @since 2.6.0
*/
default @Nullable HealthEndpointGroup get(AdditionalHealthEndpointPath path) {
Assert.notNull(path, "'path' must not be null");
@ -76,7 +75,6 @@ public interface HealthEndpointGroups { @@ -76,7 +75,6 @@ public interface HealthEndpointGroups {
* {@link WebServerNamespace}.
* @param namespace the {@link WebServerNamespace}
* @return the matching groups
* @since 2.6.0
*/
default Set<HealthEndpointGroup> getAllWithAdditionalPath(WebServerNamespace namespace) {
Assert.notNull(namespace, "'namespace' must not be null");

4
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpointGroupsPostProcessor.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointGroupsPostProcessor.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
/**
* Hook that allows for custom modification of {@link HealthEndpointGroups} &mdash; for
@ -22,7 +22,7 @@ package org.springframework.boot.actuate.health; @@ -22,7 +22,7 @@ package org.springframework.boot.actuate.health;
*
* @author Phillip Webb
* @author Brian Clozel
* @since 2.3.0
* @since 4.0.0
*/
@FunctionalInterface
public interface HealthEndpointGroupsPostProcessor {

2
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpointSupport.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointSupport.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.time.Duration;
import java.time.Instant;

5
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpointWebExtension.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointWebExtension.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.time.Duration;
import java.util.Arrays;
@ -47,7 +47,7 @@ import org.springframework.context.annotation.ImportRuntimeHints; @@ -47,7 +47,7 @@ import org.springframework.context.annotation.ImportRuntimeHints;
* @author Madhura Bhave
* @author Stephane Nicoll
* @author Scott Frederick
* @since 2.0.0
* @since 4.0.0
*/
@EndpointWebExtension(endpoint = HealthEndpoint.class)
@ImportRuntimeHints(HealthEndpointWebExtensionRuntimeHints.class)
@ -60,7 +60,6 @@ public class HealthEndpointWebExtension extends HealthEndpointSupport<Health, He @@ -60,7 +60,6 @@ public class HealthEndpointWebExtension extends HealthEndpointSupport<Health, He
* @param groups the health endpoint groups
* @param slowContributorLoggingThreshold duration after which slow health indicator
* logging should occur
* @since 4.0.0
*/
public HealthEndpointWebExtension(HealthContributorRegistry registry,
@Nullable ReactiveHealthContributorRegistry fallbackRegistry, HealthEndpointGroups groups,

2
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpointWebExtensionRuntimeHints.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointWebExtensionRuntimeHints.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import org.jspecify.annotations.Nullable;

5
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HttpCodeStatusMapper.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/HttpCodeStatusMapper.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import org.springframework.boot.health.contributor.Status;
@ -23,14 +23,13 @@ import org.springframework.boot.health.contributor.Status; @@ -23,14 +23,13 @@ import org.springframework.boot.health.contributor.Status;
*
* @author Stephane Nicoll
* @author Phillip Webb
* @since 2.2.0
* @since 4.0.0
*/
@FunctionalInterface
public interface HttpCodeStatusMapper {
/**
* An {@link HttpCodeStatusMapper} instance using default mappings.
* @since 2.3.0
*/
HttpCodeStatusMapper DEFAULT = new SimpleHttpCodeStatusMapper();

2
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/IndicatedHealthDescriptor.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/IndicatedHealthDescriptor.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.Map;

5
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/ReactiveHealthEndpointWebExtension.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/ReactiveHealthEndpointWebExtension.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.time.Duration;
import java.util.Arrays;
@ -45,7 +45,7 @@ import org.springframework.context.annotation.ImportRuntimeHints; @@ -45,7 +45,7 @@ import org.springframework.context.annotation.ImportRuntimeHints;
* @author Stephane Nicoll
* @author Phillip Webb
* @author Scott Frederick
* @since 2.0.0
* @since 4.0.0
*/
@EndpointWebExtension(endpoint = HealthEndpoint.class)
@ImportRuntimeHints(HealthEndpointWebExtensionRuntimeHints.class)
@ -59,7 +59,6 @@ public class ReactiveHealthEndpointWebExtension @@ -59,7 +59,6 @@ public class ReactiveHealthEndpointWebExtension
* @param groups the health endpoint groups
* @param slowContributorLoggingThreshold duration after which slow health indicator
* logging should occur
* @since 4.0.0
*/
public ReactiveHealthEndpointWebExtension(ReactiveHealthContributorRegistry registry,
@Nullable HealthContributorRegistry fallbackRegistry, HealthEndpointGroups groups,

4
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/SimpleHttpCodeStatusMapper.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/SimpleHttpCodeStatusMapper.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.Collections;
import java.util.HashMap;
@ -33,7 +33,7 @@ import org.springframework.util.CollectionUtils; @@ -33,7 +33,7 @@ import org.springframework.util.CollectionUtils;
*
* @author Stephane Nicoll
* @author Phillip Webb
* @since 2.2.0
* @since 4.0.0
*/
public class SimpleHttpCodeStatusMapper implements HttpCodeStatusMapper {

4
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/SimpleStatusAggregator.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/SimpleStatusAggregator.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.ArrayList;
import java.util.Arrays;
@ -35,7 +35,7 @@ import org.springframework.util.ObjectUtils; @@ -35,7 +35,7 @@ import org.springframework.util.ObjectUtils;
* {@link StatusAggregator} backed by an ordered status list.
*
* @author Phillip Webb
* @since 2.2.0
* @since 4.0.0
*/
public class SimpleStatusAggregator implements StatusAggregator {

5
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/StatusAggregator.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/StatusAggregator.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.Arrays;
import java.util.LinkedHashSet;
@ -30,7 +30,7 @@ import org.springframework.boot.health.contributor.Status; @@ -30,7 +30,7 @@ import org.springframework.boot.health.contributor.Status;
* {@link Health#getStatus()} into one state for the entire system.
*
* @author Phillip Webb
* @since 2.2.0
* @since 4.0.0
*/
@FunctionalInterface
public interface StatusAggregator {
@ -38,7 +38,6 @@ public interface StatusAggregator { @@ -38,7 +38,6 @@ public interface StatusAggregator {
/**
* Return {@link StatusAggregator} instance using default ordering rules.
* @return a {@code StatusAggregator} with default ordering rules.
* @since 2.3.0
*/
static StatusAggregator getDefault() {
return SimpleStatusAggregator.INSTANCE;

2
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/SystemHealthDescriptor.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/SystemHealthDescriptor.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.Map;
import java.util.Set;

4
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/ssl/package-info.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/actuate/endpoint/package-info.java

@ -15,9 +15,9 @@ @@ -15,9 +15,9 @@
*/
/**
* Actuator support for ssl concerns.
* Actuator endpoint for health.
*/
@NullMarked
package org.springframework.boot.actuate.ssl;
package org.springframework.boot.health.actuate.endpoint;
import org.jspecify.annotations.NullMarked;

4
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/availability/AvailabilityStateHealthIndicator.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/application/AvailabilityStateHealthIndicator.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.availability;
package org.springframework.boot.health.application;
import java.util.EnumSet;
import java.util.HashMap;
@ -37,7 +37,7 @@ import org.springframework.util.Assert; @@ -37,7 +37,7 @@ import org.springframework.util.Assert;
*
* @author Phillip Webb
* @author Brian Clozel
* @since 2.3.0
* @since 4.0.0
*/
public class AvailabilityStateHealthIndicator extends AbstractHealthIndicator {

4
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/system/DiskSpaceHealthIndicator.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/application/DiskSpaceHealthIndicator.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.system;
package org.springframework.boot.health.application;
import java.io.File;
@ -35,7 +35,7 @@ import org.springframework.util.unit.DataSize; @@ -35,7 +35,7 @@ import org.springframework.util.unit.DataSize;
* @author Mattias Severson
* @author Andy Wilkinson
* @author Stephane Nicoll
* @since 2.0.0
* @since 4.0.0
*/
public class DiskSpaceHealthIndicator extends AbstractHealthIndicator {

4
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/availability/LivenessStateHealthIndicator.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/application/LivenessStateHealthIndicator.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.availability;
package org.springframework.boot.health.application;
import org.springframework.boot.availability.ApplicationAvailability;
import org.springframework.boot.availability.AvailabilityState;
@ -26,7 +26,7 @@ import org.springframework.boot.health.contributor.Status; @@ -26,7 +26,7 @@ import org.springframework.boot.health.contributor.Status;
* A {@link HealthIndicator} that checks the {@link LivenessState} of the application.
*
* @author Brian Clozel
* @since 2.3.0
* @since 4.0.0
*/
public class LivenessStateHealthIndicator extends AvailabilityStateHealthIndicator {

4
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/availability/ReadinessStateHealthIndicator.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/application/ReadinessStateHealthIndicator.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.availability;
package org.springframework.boot.health.application;
import org.springframework.boot.availability.ApplicationAvailability;
import org.springframework.boot.availability.AvailabilityState;
@ -27,7 +27,7 @@ import org.springframework.boot.health.contributor.Status; @@ -27,7 +27,7 @@ import org.springframework.boot.health.contributor.Status;
*
* @author Brian Clozel
* @author Phillip Webb
* @since 2.3.0
* @since 4.0.0
*/
public class ReadinessStateHealthIndicator extends AvailabilityStateHealthIndicator {

4
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/ssl/SslHealthIndicator.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/application/SslHealthIndicator.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.ssl;
package org.springframework.boot.health.application;
import java.time.Duration;
import java.time.Instant;
@ -39,7 +39,7 @@ import org.springframework.util.Assert; @@ -39,7 +39,7 @@ import org.springframework.util.Assert;
*
* @author Jonatan Ivanov
* @author Young Jae You
* @since 3.4.0
* @since 4.0.0
*/
public class SslHealthIndicator extends AbstractHealthIndicator {

4
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/availability/package-info.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/application/package-info.java

@ -15,9 +15,9 @@ @@ -15,9 +15,9 @@
*/
/**
* Actuator support for application availability concerns.
* Health indicators providing information about an application.
*/
@NullMarked
package org.springframework.boot.actuate.availability;
package org.springframework.boot.health.application;
import org.jspecify.annotations.NullMarked;

10
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/AutoConfiguredHealthEndpointGroup.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/AutoConfiguredHealthEndpointGroup.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.health;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import java.util.Collection;
import java.util.function.Predicate;
@ -23,10 +23,10 @@ import org.jspecify.annotations.Nullable; @@ -23,10 +23,10 @@ import org.jspecify.annotations.Nullable;
import org.springframework.boot.actuate.endpoint.SecurityContext;
import org.springframework.boot.actuate.endpoint.Show;
import org.springframework.boot.actuate.health.AdditionalHealthEndpointPath;
import org.springframework.boot.actuate.health.HealthEndpointGroup;
import org.springframework.boot.actuate.health.HttpCodeStatusMapper;
import org.springframework.boot.actuate.health.StatusAggregator;
import org.springframework.boot.health.actuate.endpoint.AdditionalHealthEndpointPath;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroup;
import org.springframework.boot.health.actuate.endpoint.HttpCodeStatusMapper;
import org.springframework.boot.health.actuate.endpoint.StatusAggregator;
/**
* Auto-configured {@link HealthEndpointGroup} backed by {@link HealthProperties}.

22
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/AutoConfiguredHealthEndpointGroups.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/AutoConfiguredHealthEndpointGroups.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.health;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import java.util.ArrayList;
import java.util.Collections;
@ -34,20 +34,20 @@ import org.springframework.beans.factory.BeanFactoryUtils; @@ -34,20 +34,20 @@ import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.annotation.BeanFactoryAnnotationUtils;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointProperties.Group;
import org.springframework.boot.actuate.autoconfigure.health.HealthProperties.Status;
import org.springframework.boot.actuate.endpoint.EndpointId;
import org.springframework.boot.actuate.endpoint.Show;
import org.springframework.boot.actuate.endpoint.web.AdditionalPathsMapper;
import org.springframework.boot.actuate.endpoint.web.WebServerNamespace;
import org.springframework.boot.actuate.health.AdditionalHealthEndpointPath;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.HealthEndpointGroup;
import org.springframework.boot.actuate.health.HealthEndpointGroups;
import org.springframework.boot.actuate.health.HttpCodeStatusMapper;
import org.springframework.boot.actuate.health.SimpleHttpCodeStatusMapper;
import org.springframework.boot.actuate.health.SimpleStatusAggregator;
import org.springframework.boot.actuate.health.StatusAggregator;
import org.springframework.boot.health.actuate.endpoint.AdditionalHealthEndpointPath;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroup;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroups;
import org.springframework.boot.health.actuate.endpoint.HttpCodeStatusMapper;
import org.springframework.boot.health.actuate.endpoint.SimpleHttpCodeStatusMapper;
import org.springframework.boot.health.actuate.endpoint.SimpleStatusAggregator;
import org.springframework.boot.health.actuate.endpoint.StatusAggregator;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointProperties.Group;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthProperties.Status;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.util.CollectionUtils;

12
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityProbesAutoConfiguration.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/AvailabilityProbesAutoConfiguration.java

@ -14,10 +14,8 @@ @@ -14,10 +14,8 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.availability;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import org.springframework.boot.actuate.availability.LivenessStateHealthIndicator;
import org.springframework.boot.actuate.availability.ReadinessStateHealthIndicator;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfiguration;
@ -25,7 +23,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProp @@ -25,7 +23,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProp
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.availability.ApplicationAvailability;
import org.springframework.boot.health.contributor.Health;
import org.springframework.boot.health.application.LivenessStateHealthIndicator;
import org.springframework.boot.health.application.ReadinessStateHealthIndicator;
import org.springframework.boot.health.autoconfigure.application.AvailabilityHealthContributorAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;
@ -34,11 +34,11 @@ import org.springframework.core.env.Environment; @@ -34,11 +34,11 @@ import org.springframework.core.env.Environment;
*
* @author Brian Clozel
* @author Phillip Webb
* @since 2.3.0
* @since 4.0.0
*/
@AutoConfiguration(after = { AvailabilityHealthContributorAutoConfiguration.class,
ApplicationAvailabilityAutoConfiguration.class })
@ConditionalOnClass(Health.class)
@ConditionalOnClass(name = "org.springframework.boot.actuate.endpoint.annotation.Endpoint")
@ConditionalOnBooleanProperty(name = "management.endpoint.health.probes.enabled", matchIfMissing = true)
public final class AvailabilityProbesAutoConfiguration {

10
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityProbesHealthEndpointGroup.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/AvailabilityProbesHealthEndpointGroup.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.availability;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import java.util.Arrays;
import java.util.HashSet;
@ -23,10 +23,10 @@ import java.util.Set; @@ -23,10 +23,10 @@ import java.util.Set;
import org.jspecify.annotations.Nullable;
import org.springframework.boot.actuate.endpoint.SecurityContext;
import org.springframework.boot.actuate.health.AdditionalHealthEndpointPath;
import org.springframework.boot.actuate.health.HealthEndpointGroup;
import org.springframework.boot.actuate.health.HttpCodeStatusMapper;
import org.springframework.boot.actuate.health.StatusAggregator;
import org.springframework.boot.health.actuate.endpoint.AdditionalHealthEndpointPath;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroup;
import org.springframework.boot.health.actuate.endpoint.HttpCodeStatusMapper;
import org.springframework.boot.health.actuate.endpoint.StatusAggregator;
/**
* {@link HealthEndpointGroup} used to support availability probes.

10
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityProbesHealthEndpointGroups.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/AvailabilityProbesHealthEndpointGroups.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.availability;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import java.util.ArrayList;
import java.util.Collections;
@ -30,10 +30,10 @@ import org.jspecify.annotations.Nullable; @@ -30,10 +30,10 @@ import org.jspecify.annotations.Nullable;
import org.springframework.boot.actuate.endpoint.EndpointId;
import org.springframework.boot.actuate.endpoint.web.AdditionalPathsMapper;
import org.springframework.boot.actuate.endpoint.web.WebServerNamespace;
import org.springframework.boot.actuate.health.AdditionalHealthEndpointPath;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.HealthEndpointGroup;
import org.springframework.boot.actuate.health.HealthEndpointGroups;
import org.springframework.boot.health.actuate.endpoint.AdditionalHealthEndpointPath;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroup;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroups;
import org.springframework.util.Assert;
/**

6
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityProbesHealthEndpointGroupsPostProcessor.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/AvailabilityProbesHealthEndpointGroupsPostProcessor.java

@ -14,10 +14,10 @@ @@ -14,10 +14,10 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.availability;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import org.springframework.boot.actuate.health.HealthEndpointGroups;
import org.springframework.boot.actuate.health.HealthEndpointGroupsPostProcessor;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroups;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroupsPostProcessor;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.core.env.Environment;

10
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/availability/DelegatingAvailabilityProbesHealthEndpointGroup.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/DelegatingAvailabilityProbesHealthEndpointGroup.java

@ -14,13 +14,13 @@ @@ -14,13 +14,13 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.availability;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import org.springframework.boot.actuate.endpoint.SecurityContext;
import org.springframework.boot.actuate.health.AdditionalHealthEndpointPath;
import org.springframework.boot.actuate.health.HealthEndpointGroup;
import org.springframework.boot.actuate.health.HttpCodeStatusMapper;
import org.springframework.boot.actuate.health.StatusAggregator;
import org.springframework.boot.health.actuate.endpoint.AdditionalHealthEndpointPath;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroup;
import org.springframework.boot.health.actuate.endpoint.HttpCodeStatusMapper;
import org.springframework.boot.health.actuate.endpoint.StatusAggregator;
import org.springframework.util.Assert;
/**

4
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/GroupsHealthContributorNameValidator.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/GroupsHealthContributorNameValidator.java

@ -14,14 +14,14 @@ @@ -14,14 +14,14 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.health;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import java.util.Collections;
import java.util.Set;
import org.jspecify.annotations.Nullable;
import org.springframework.boot.actuate.health.HealthEndpointGroups;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroups;
import org.springframework.boot.health.registry.HealthContributorNameValidator;
import org.springframework.util.Assert;

13
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthEndpointAutoConfiguration.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/HealthEndpointAutoConfiguration.java

@ -14,16 +14,16 @@ @@ -14,16 +14,16 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.health;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.health.contributor.Health;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.autoconfigure.registry.HealthContributorRegistryAutoConfiguration;
import org.springframework.context.annotation.Import;
/**
@ -33,11 +33,10 @@ import org.springframework.context.annotation.Import; @@ -33,11 +33,10 @@ import org.springframework.context.annotation.Import;
* @author Stephane Nicoll
* @author Phillip Webb
* @author Scott Frederick
* @since 2.0.0
* @since 4.0.0
*/
@AutoConfiguration(
afterName = "org.springframework.boot.health.autoconfigure.registry.HealthContributorRegistryAutoConfiguration")
@ConditionalOnClass(Health.class)
@AutoConfiguration(after = HealthContributorRegistryAutoConfiguration.class)
@ConditionalOnClass(name = "org.springframework.boot.actuate.endpoint.annotation.Endpoint")
@ConditionalOnBean(type = "org.springframework.boot.health.registry.HealthContributorRegistry")
@ConditionalOnAvailableEndpoint(HealthEndpoint.class)
@EnableConfigurationProperties(HealthEndpointProperties.class)

16
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/HealthEndpointConfiguration.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.health;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import java.util.Set;
@ -24,15 +24,15 @@ import org.springframework.beans.BeansException; @@ -24,15 +24,15 @@ import org.springframework.beans.BeansException;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.HealthEndpointGroups;
import org.springframework.boot.actuate.health.HealthEndpointGroupsPostProcessor;
import org.springframework.boot.actuate.health.HttpCodeStatusMapper;
import org.springframework.boot.actuate.health.SimpleHttpCodeStatusMapper;
import org.springframework.boot.actuate.health.SimpleStatusAggregator;
import org.springframework.boot.actuate.health.StatusAggregator;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroups;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroupsPostProcessor;
import org.springframework.boot.health.actuate.endpoint.HttpCodeStatusMapper;
import org.springframework.boot.health.actuate.endpoint.SimpleHttpCodeStatusMapper;
import org.springframework.boot.health.actuate.endpoint.SimpleStatusAggregator;
import org.springframework.boot.health.actuate.endpoint.StatusAggregator;
import org.springframework.boot.health.contributor.HealthContributors;
import org.springframework.boot.health.registry.HealthContributorRegistry;
import org.springframework.boot.health.registry.ReactiveHealthContributorRegistry;

6
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthEndpointProperties.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/HealthEndpointProperties.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.health;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import java.time.Duration;
import java.util.LinkedHashMap;
@ -24,15 +24,15 @@ import java.util.Set; @@ -24,15 +24,15 @@ import java.util.Set;
import org.jspecify.annotations.Nullable;
import org.springframework.boot.actuate.endpoint.Show;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
/**
* Configuration properties for {@link HealthEndpoint}.
*
* @author Phillip Webb
* @author Leo Li
* @since 2.0.0
* @since 4.0.0
*/
@ConfigurationProperties("management.endpoint.health")
public class HealthEndpointProperties extends HealthProperties {

8
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthEndpointReactiveWebExtensionConfiguration.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/HealthEndpointReactiveWebExtensionConfiguration.java

@ -14,18 +14,18 @@ @@ -14,18 +14,18 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.health;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
import org.springframework.boot.actuate.autoconfigure.endpoint.expose.EndpointExposure;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.HealthEndpointGroups;
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroups;
import org.springframework.boot.health.actuate.endpoint.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.health.registry.HealthContributorRegistry;
import org.springframework.boot.health.registry.ReactiveHealthContributorRegistry;
import org.springframework.context.annotation.Bean;

8
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthEndpointWebExtensionConfiguration.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/HealthEndpointWebExtensionConfiguration.java

@ -14,18 +14,18 @@ @@ -14,18 +14,18 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.health;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
import org.springframework.boot.actuate.autoconfigure.endpoint.expose.EndpointExposure;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.HealthEndpointGroups;
import org.springframework.boot.actuate.health.HealthEndpointWebExtension;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.health.actuate.endpoint.HealthEndpoint;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointGroups;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointWebExtension;
import org.springframework.boot.health.registry.HealthContributorRegistry;
import org.springframework.boot.health.registry.ReactiveHealthContributorRegistry;
import org.springframework.context.annotation.Bean;

4
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthProperties.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/HealthProperties.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.health;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import java.util.ArrayList;
import java.util.HashMap;
@ -34,7 +34,7 @@ import org.springframework.util.CollectionUtils; @@ -34,7 +34,7 @@ import org.springframework.util.CollectionUtils;
*
* @author Stephane Nicoll
* @author Phillip Webb
* @since 2.2.0
* @since 4.0.0
*/
public abstract class HealthProperties {

2
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/IncludeExcludeGroupMemberPredicate.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/IncludeExcludeGroupMemberPredicate.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.health;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import java.util.Collections;
import java.util.LinkedHashSet;

4
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/NoSuchHealthContributorFailureAnalyzer.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/NoSuchHealthContributorFailureAnalyzer.java

@ -14,11 +14,11 @@ @@ -14,11 +14,11 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.health;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointConfiguration.HealthEndpointGroupMembershipValidator.NoSuchHealthContributorException;
import org.springframework.boot.diagnostics.AbstractFailureAnalyzer;
import org.springframework.boot.diagnostics.FailureAnalysis;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointConfiguration.HealthEndpointGroupMembershipValidator.NoSuchHealthContributorException;
/**
* An {@link AbstractFailureAnalyzer} that performs analysis of failures caused by a

4
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/ssl/package-info.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/actuate/endpoint/package-info.java

@ -15,9 +15,9 @@ @@ -15,9 +15,9 @@
*/
/**
* Auto-configuration for actuator ssl concerns.
* Auto-configuration for health actuator endpoints.
*/
@NullMarked
package org.springframework.boot.actuate.autoconfigure.ssl;
package org.springframework.boot.health.autoconfigure.actuate.endpoint;
import org.jspecify.annotations.NullMarked;

10
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityHealthContributorAutoConfiguration.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/application/AvailabilityHealthContributorAutoConfiguration.java

@ -14,11 +14,8 @@ @@ -14,11 +14,8 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.availability;
package org.springframework.boot.health.autoconfigure.application;
import org.springframework.boot.actuate.availability.AvailabilityStateHealthIndicator;
import org.springframework.boot.actuate.availability.LivenessStateHealthIndicator;
import org.springframework.boot.actuate.availability.ReadinessStateHealthIndicator;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfiguration;
@ -26,6 +23,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProp @@ -26,6 +23,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProp
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.availability.ApplicationAvailability;
import org.springframework.boot.health.application.AvailabilityStateHealthIndicator;
import org.springframework.boot.health.application.LivenessStateHealthIndicator;
import org.springframework.boot.health.application.ReadinessStateHealthIndicator;
import org.springframework.boot.health.contributor.Health;
import org.springframework.context.annotation.Bean;
@ -34,7 +34,7 @@ import org.springframework.context.annotation.Bean; @@ -34,7 +34,7 @@ import org.springframework.context.annotation.Bean;
* {@link AvailabilityStateHealthIndicator}.
*
* @author Brian Clozel
* @since 2.3.2
* @since 4.0.0
*/
@AutoConfiguration(after = ApplicationAvailabilityAutoConfiguration.class)
@ConditionalOnClass(Health.class)

10
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/system/DiskSpaceHealthContributorAutoConfiguration.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/application/DiskSpaceHealthContributorAutoConfiguration.java

@ -14,15 +14,16 @@ @@ -14,15 +14,16 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.system;
package org.springframework.boot.health.autoconfigure.application;
import org.springframework.boot.actuate.system.DiskSpaceHealthIndicator;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.health.application.DiskSpaceHealthIndicator;
import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator;
import org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration;
import org.springframework.boot.health.contributor.Health;
import org.springframework.context.annotation.Bean;
@ -32,10 +33,9 @@ import org.springframework.context.annotation.Bean; @@ -32,10 +33,9 @@ import org.springframework.context.annotation.Bean;
*
* @author Mattias Severson
* @author Andy Wilkinson
* @since 2.0.0
* @since 4.0.0
*/
@AutoConfiguration(
beforeName = "org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration")
@AutoConfiguration(before = HealthContributorAutoConfiguration.class)
@ConditionalOnClass(Health.class)
@ConditionalOnEnabledHealthIndicator("diskspace")
@EnableConfigurationProperties(DiskSpaceHealthIndicatorProperties.class)

6
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/system/DiskSpaceHealthIndicatorProperties.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/application/DiskSpaceHealthIndicatorProperties.java

@ -14,12 +14,12 @@ @@ -14,12 +14,12 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.system;
package org.springframework.boot.health.autoconfigure.application;
import java.io.File;
import org.springframework.boot.actuate.system.DiskSpaceHealthIndicator;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.health.application.DiskSpaceHealthIndicator;
import org.springframework.util.Assert;
import org.springframework.util.unit.DataSize;
@ -28,7 +28,7 @@ import org.springframework.util.unit.DataSize; @@ -28,7 +28,7 @@ import org.springframework.util.unit.DataSize;
*
* @author Andy Wilkinson
* @author Stephane Nicoll
* @since 1.2.0
* @since 4.0.0
*/
@ConfigurationProperties("management.health.diskspace")
public class DiskSpaceHealthIndicatorProperties {

10
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/ssl/SslHealthContributorAutoConfiguration.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/application/SslHealthContributorAutoConfiguration.java

@ -14,15 +14,16 @@ @@ -14,15 +14,16 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.ssl;
package org.springframework.boot.health.autoconfigure.application;
import org.springframework.boot.actuate.ssl.SslHealthIndicator;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.health.application.SslHealthIndicator;
import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator;
import org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration;
import org.springframework.boot.health.contributor.Health;
import org.springframework.boot.info.SslInfo;
import org.springframework.boot.ssl.SslBundles;
@ -32,10 +33,9 @@ import org.springframework.context.annotation.Bean; @@ -32,10 +33,9 @@ import org.springframework.context.annotation.Bean;
* {@link EnableAutoConfiguration Auto-configuration} for {@link SslHealthIndicator}.
*
* @author Jonatan Ivanov
* @since 3.4.0
* @since 4.0.0
*/
@AutoConfiguration(
beforeName = "org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration")
@AutoConfiguration(before = HealthContributorAutoConfiguration.class)
@ConditionalOnClass(Health.class)
@ConditionalOnEnabledHealthIndicator("ssl")
@EnableConfigurationProperties(SslHealthIndicatorProperties.class)

6
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/ssl/SslHealthIndicatorProperties.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/application/SslHealthIndicatorProperties.java

@ -14,18 +14,18 @@ @@ -14,18 +14,18 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.ssl;
package org.springframework.boot.health.autoconfigure.application;
import java.time.Duration;
import org.springframework.boot.actuate.ssl.SslHealthIndicator;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.health.application.SslHealthIndicator;
/**
* External configuration properties for {@link SslHealthIndicator}.
*
* @author Jonatan Ivanov
* @since 3.4.0
* @since 4.0.0
*/
@ConfigurationProperties("management.health.ssl")
public class SslHealthIndicatorProperties {

5
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/package-info.java → module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/application/package-info.java

@ -14,10 +14,7 @@ @@ -14,10 +14,7 @@
* limitations under the License.
*/
/**
* Actuator health indicator and endpoints.
*/
@NullMarked
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.autoconfigure.application;
import org.jspecify.annotations.NullMarked;

2
module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/contributor/AbstractCompositeHealthContributorConfiguration.java

@ -41,7 +41,6 @@ abstract class AbstractCompositeHealthContributorConfiguration<C, I extends C, B @@ -41,7 +41,6 @@ abstract class AbstractCompositeHealthContributorConfiguration<C, I extends C, B
* Creates a {@code AbstractCompositeHealthContributorConfiguration} that will use the
* given {@code indicatorFactory} to create health indicator instances.
* @param indicatorFactory the function to create health indicators
* @since 3.0.0
*/
protected AbstractCompositeHealthContributorConfiguration(Function<B, I> indicatorFactory) {
this.indicatorFactory = indicatorFactory;
@ -53,7 +52,6 @@ abstract class AbstractCompositeHealthContributorConfiguration<C, I extends C, B @@ -53,7 +52,6 @@ abstract class AbstractCompositeHealthContributorConfiguration<C, I extends C, B
* @param beanFactory the bean factory from which the beans are retrieved
* @param beanType the type of the beans that are retrieved
* @return the contributor
* @since 3.4.3
*/
protected final C createContributor(ConfigurableListableBeanFactory beanFactory, Class<B> beanType) {
return createContributor(SimpleAutowireCandidateResolver.resolveAutowireCandidates(beanFactory, beanType));

2
module/spring-boot-health/src/main/java/org/springframework/boot/health/autoconfigure/registry/HealthContributorRegistryAutoConfiguration.java

@ -34,6 +34,7 @@ import org.springframework.boot.health.registry.HealthContributorNameValidator; @@ -34,6 +34,7 @@ import org.springframework.boot.health.registry.HealthContributorNameValidator;
import org.springframework.boot.health.registry.HealthContributorRegistry;
import org.springframework.boot.health.registry.ReactiveHealthContributorRegistry;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* {@link EnableAutoConfiguration Auto-configuration} for
@ -58,6 +59,7 @@ public final class HealthContributorRegistryAutoConfiguration { @@ -58,6 +59,7 @@ public final class HealthContributorRegistryAutoConfiguration {
return new DefaultHealthContributorRegistry(nameValidators, nameGenerator.registrar(contributorBeans));
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(Flux.class)
static class ReactiveHealthContributorRegistryConfiguration {

110
module/spring-boot-health/src/main/resources/META-INF/additional-spring-configuration-metadata.json

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
{
"groups": [],
"properties": [
{
"name": "management.endpoint.health.probes.add-additional-paths",
"type": "java.lang.Boolean",
"description": "Whether to make the liveness and readiness health groups available on the main server port.",
"defaultValue": false
},
{
"name": "management.endpoint.health.probes.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable liveness and readiness probes.",
"defaultValue": true
},
{
"name": "management.endpoint.health.status.order",
"defaultValue": [
"DOWN",
"OUT_OF_SERVICE",
"UP",
"UNKNOWN"
]
},
{
"name": "management.endpoint.health.validate-group-membership",
"type": "java.lang.Boolean",
"description": "Whether to validate health group membership on startup. Validation fails if a group includes or excludes a health contributor that does not exist.",
"defaultValue": true
},
{
"name": "management.health.defaults.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable default health indicators.",
"defaultValue": true
},
{
"name": "management.health.diskspace.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable disk space health check.",
"defaultValue": true
},
{
"name": "management.health.influxdb.enabled",
"type": "java.lang.Boolean",
"deprecation": {
"level": "error",
"reason": "InfluxDB support has been removed."
}
},
{
"name": "management.health.livenessstate.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable liveness state health check.",
"defaultValue": false
},
{
"name": "management.health.ping.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable ping health check.",
"defaultValue": true
},
{
"name": "management.health.probes.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable liveness and readiness probes.",
"defaultValue": false,
"deprecation": {
"level": "error",
"replacement": "management.endpoint.health.probes.enabled"
}
},
{
"name": "management.health.readinessstate.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable readiness state health check.",
"defaultValue": false
},
{
"name": "management.health.ssl.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable SSL certificate health check.",
"defaultValue": true
}
],
"hints": [
{
"name": "management.health.status.order",
"values": [
{
"value": "UNKNOWN"
},
{
"value": "UP"
},
{
"value": "DOWN"
},
{
"value": "OUT_OF_SERVICE"
}
],
"providers": [
{
"name": "any"
}
]
}
]
}

3
module/spring-boot-health/src/main/resources/META-INF/spring.factories

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
# Failure Analyzers
org.springframework.boot.diagnostics.FailureAnalyzer=\
org.springframework.boot.health.autoconfigure.actuate.endpoint.NoSuchHealthContributorFailureAnalyzer

5
module/spring-boot-health/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

@ -1,2 +1,7 @@ @@ -1,2 +1,7 @@
org.springframework.boot.health.autoconfigure.actuate.endpoint.AvailabilityProbesAutoConfiguration
org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointAutoConfiguration
org.springframework.boot.health.autoconfigure.application.AvailabilityHealthContributorAutoConfiguration
org.springframework.boot.health.autoconfigure.application.DiskSpaceHealthContributorAutoConfiguration
org.springframework.boot.health.autoconfigure.application.SslHealthContributorAutoConfiguration
org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration
org.springframework.boot.health.autoconfigure.registry.HealthContributorRegistryAutoConfiguration

2
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/AdditionalHealthEndpointPathTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/AdditionalHealthEndpointPathTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import org.junit.jupiter.api.Test;

2
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthDescriptorTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/CompositeHealthDescriptorTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.Collections;
import java.util.LinkedHashMap;

2
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthEndpointGroupsTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointGroupsTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.Collections;

4
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthEndpointSupportTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointSupportTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.time.Duration;
import java.util.Collections;
@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test; @@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.endpoint.ApiVersion;
import org.springframework.boot.actuate.endpoint.SecurityContext;
import org.springframework.boot.actuate.endpoint.web.WebServerNamespace;
import org.springframework.boot.actuate.health.HealthEndpointSupport.Result;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointSupport.Result;
import org.springframework.boot.health.contributor.Health;
import org.springframework.boot.health.contributor.Status;

4
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthEndpointTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.time.Duration;
import java.util.Collections;
@ -26,7 +26,7 @@ import org.jspecify.annotations.Nullable; @@ -26,7 +26,7 @@ import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.actuate.health.HealthEndpointSupport.Result;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointSupport.Result;
import org.springframework.boot.health.contributor.CompositeHealthContributor;
import org.springframework.boot.health.contributor.Health;
import org.springframework.boot.health.contributor.HealthContributor;

2
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthEndpointWebExtensionRuntimeHintsTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointWebExtensionRuntimeHintsTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.Set;

4
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthEndpointWebExtensionTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/HealthEndpointWebExtensionTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.time.Duration;
import java.util.Collections;
@ -29,7 +29,7 @@ import org.springframework.boot.actuate.endpoint.ApiVersion; @@ -29,7 +29,7 @@ import org.springframework.boot.actuate.endpoint.ApiVersion;
import org.springframework.boot.actuate.endpoint.SecurityContext;
import org.springframework.boot.actuate.endpoint.web.WebEndpointResponse;
import org.springframework.boot.actuate.endpoint.web.WebServerNamespace;
import org.springframework.boot.actuate.health.HealthEndpointSupport.Result;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointSupport.Result;
import org.springframework.boot.health.contributor.CompositeHealthContributor;
import org.springframework.boot.health.contributor.Health;
import org.springframework.boot.health.contributor.HealthContributor;

2
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/IndicatedHealthDescriptorTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/IndicatedHealthDescriptorTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import org.junit.jupiter.api.Test;
import tools.jackson.databind.MapperFeature;

4
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/ReactiveHealthEndpointWebExtensionTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/ReactiveHealthEndpointWebExtensionTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.time.Duration;
import java.util.Collections;
@ -29,7 +29,7 @@ import reactor.core.publisher.Mono; @@ -29,7 +29,7 @@ import reactor.core.publisher.Mono;
import org.springframework.boot.actuate.endpoint.ApiVersion;
import org.springframework.boot.actuate.endpoint.SecurityContext;
import org.springframework.boot.actuate.endpoint.web.WebEndpointResponse;
import org.springframework.boot.actuate.health.HealthEndpointSupport.Result;
import org.springframework.boot.health.actuate.endpoint.HealthEndpointSupport.Result;
import org.springframework.boot.health.contributor.CompositeReactiveHealthContributor;
import org.springframework.boot.health.contributor.Health;
import org.springframework.boot.health.contributor.ReactiveHealthContributor;

2
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/ReactiveHealthIndicatorImplementationTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/ReactiveHealthIndicatorImplementationTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.time.Duration;

2
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SimpleHttpCodeStatusMapperTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/SimpleHttpCodeStatusMapperTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.LinkedHashMap;
import java.util.Map;

2
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SimpleStatusAggregatorTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/SimpleStatusAggregatorTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import org.junit.jupiter.api.Test;

2
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SystemHealthDescriptorTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/SystemHealthDescriptorTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.Arrays;
import java.util.LinkedHashMap;

2
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/TestHealthEndpointGroup.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/actuate/endpoint/TestHealthEndpointGroup.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
package org.springframework.boot.health.actuate.endpoint;
import java.util.function.Predicate;

2
module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/availability/AvailabilityStateHealthIndicatorTests.java → module/spring-boot-health/src/test/java/org/springframework/boot/health/application/AvailabilityStateHealthIndicatorTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.availability;
package org.springframework.boot.health.application;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save