Commit 6c763536 authored by Phillip Webb's avatar Phillip Webb

Default `management.cloudfoundry.enabled` to true

Update `CloudFoundryActuatorAutoConfiguration` so that it is enabled
when `management.cloudfoundry.enabled` is missing.

See gh-7108
parent a77cfc3b
......@@ -45,7 +45,7 @@ import org.springframework.web.servlet.HandlerInterceptor;
* @since 1.5.0
*/
@Configuration
@ConditionalOnProperty(prefix = "management.cloudfoundry", name = "enabled", matchIfMissing = false)
@ConditionalOnProperty(prefix = "management.cloudfoundry", name = "enabled", matchIfMissing = true)
@ConditionalOnBean(MvcEndpoints.class)
@AutoConfigureAfter(EndpointWebMvcAutoConfiguration.class)
@ConditionalOnCloudPlatform(CloudPlatform.CLOUD_FOUNDRY)
......
......@@ -110,7 +110,6 @@ public class CloudFoundryActuatorAutoConfigurationTests {
public void cloudFoundryPlatformActiveAndCloudControllerUrlNotPresent()
throws Exception {
EnvironmentTestUtils.addEnvironment(this.context, "VCAP_APPLICATION:---",
"management.cloudfoundry.enabled:true",
"vcap.application.application_id:my-app-id");
this.context.refresh();
CloudFoundryEndpointHandlerMapping handlerMapping1 = this.context.getBean(
......@@ -126,7 +125,6 @@ public class CloudFoundryActuatorAutoConfigurationTests {
private CloudFoundryEndpointHandlerMapping x() {
EnvironmentTestUtils.addEnvironment(this.context, "VCAP_APPLICATION:---",
"management.cloudfoundry.enabled:true",
"vcap.application.application_id:my-app-id",
"vcap.application.cf_api:http://my-cloud-controller.com");
this.context.refresh();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment