Skip to content

Commit 6c76353

Browse files
committed
Default management.cloudfoundry.enabled to true
Update `CloudFoundryActuatorAutoConfiguration` so that it is enabled when `management.cloudfoundry.enabled` is missing. See gh-7108
1 parent a77cfc3 commit 6c76353

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cloudfoundry/CloudFoundryActuatorAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* @since 1.5.0
4646
*/
4747
@Configuration
48-
@ConditionalOnProperty(prefix = "management.cloudfoundry", name = "enabled", matchIfMissing = false)
48+
@ConditionalOnProperty(prefix = "management.cloudfoundry", name = "enabled", matchIfMissing = true)
4949
@ConditionalOnBean(MvcEndpoints.class)
5050
@AutoConfigureAfter(EndpointWebMvcAutoConfiguration.class)
5151
@ConditionalOnCloudPlatform(CloudPlatform.CLOUD_FOUNDRY)

spring-boot-actuator/src/test/java/org/springframework/boot/actuate/cloudfoundry/CloudFoundryActuatorAutoConfigurationTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ public void cloudFoundryPlatformActiveSetsCloudControllerUrl() throws Exception
110110
public void cloudFoundryPlatformActiveAndCloudControllerUrlNotPresent()
111111
throws Exception {
112112
EnvironmentTestUtils.addEnvironment(this.context, "VCAP_APPLICATION:---",
113-
"management.cloudfoundry.enabled:true",
114113
"vcap.application.application_id:my-app-id");
115114
this.context.refresh();
116115
CloudFoundryEndpointHandlerMapping handlerMapping1 = this.context.getBean(
@@ -126,7 +125,6 @@ public void cloudFoundryPlatformActiveAndCloudControllerUrlNotPresent()
126125

127126
private CloudFoundryEndpointHandlerMapping x() {
128127
EnvironmentTestUtils.addEnvironment(this.context, "VCAP_APPLICATION:---",
129-
"management.cloudfoundry.enabled:true",
130128
"vcap.application.application_id:my-app-id",
131129
"vcap.application.cf_api:http://my-cloud-controller.com");
132130
this.context.refresh();

0 commit comments

Comments
 (0)