You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Activate health probes in Cloud Foundry environments
This commit ensures that Health probes are automatically enabled when
the application runs on Cloud Foundry. This was already the case for
Kubernetes, but now that Cloud Foundry supports this feature we should
do the same.
Closesgh-39804
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityProbesAutoConfiguration.java
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2012-2022 the original author or authors.
2
+
* Copyright 2012-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -91,6 +91,9 @@ public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeM
91
91
if (CloudPlatform.getActive(environment) == CloudPlatform.KUBERNETES) {
92
92
returnConditionOutcome.match(message.because("running on Kubernetes"));
93
93
}
94
+
if (CloudPlatform.getActive(environment) == CloudPlatform.CLOUD_FOUNDRY) {
95
+
returnConditionOutcome.match(message.because("running on Cloud Foundry"));
96
+
}
94
97
returnConditionOutcome.noMatch(message.because("not running on a supported cloud platform"));
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityProbesAutoConfigurationTests.java
+27-22Lines changed: 27 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2012-2023 the original author or authors.
2
+
* Copyright 2012-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
0 commit comments