Default `management.cloudfoundry.enabled` to true

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

See gh-7108
pull/7387/head
Phillip Webb 8 years ago
parent a77cfc3b0e
commit 6c76353682

@ -45,7 +45,7 @@ import org.springframework.web.servlet.HandlerInterceptor;
* @since 1.5.0 * @since 1.5.0
*/ */
@Configuration @Configuration
@ConditionalOnProperty(prefix = "management.cloudfoundry", name = "enabled", matchIfMissing = false) @ConditionalOnProperty(prefix = "management.cloudfoundry", name = "enabled", matchIfMissing = true)
@ConditionalOnBean(MvcEndpoints.class) @ConditionalOnBean(MvcEndpoints.class)
@AutoConfigureAfter(EndpointWebMvcAutoConfiguration.class) @AutoConfigureAfter(EndpointWebMvcAutoConfiguration.class)
@ConditionalOnCloudPlatform(CloudPlatform.CLOUD_FOUNDRY) @ConditionalOnCloudPlatform(CloudPlatform.CLOUD_FOUNDRY)

@ -110,7 +110,6 @@ public class CloudFoundryActuatorAutoConfigurationTests {
public void cloudFoundryPlatformActiveAndCloudControllerUrlNotPresent() public void cloudFoundryPlatformActiveAndCloudControllerUrlNotPresent()
throws Exception { throws Exception {
EnvironmentTestUtils.addEnvironment(this.context, "VCAP_APPLICATION:---", EnvironmentTestUtils.addEnvironment(this.context, "VCAP_APPLICATION:---",
"management.cloudfoundry.enabled:true",
"vcap.application.application_id:my-app-id"); "vcap.application.application_id:my-app-id");
this.context.refresh(); this.context.refresh();
CloudFoundryEndpointHandlerMapping handlerMapping1 = this.context.getBean( CloudFoundryEndpointHandlerMapping handlerMapping1 = this.context.getBean(
@ -126,7 +125,6 @@ public class CloudFoundryActuatorAutoConfigurationTests {
private CloudFoundryEndpointHandlerMapping x() { private CloudFoundryEndpointHandlerMapping x() {
EnvironmentTestUtils.addEnvironment(this.context, "VCAP_APPLICATION:---", EnvironmentTestUtils.addEnvironment(this.context, "VCAP_APPLICATION:---",
"management.cloudfoundry.enabled:true",
"vcap.application.application_id:my-app-id", "vcap.application.application_id:my-app-id",
"vcap.application.cf_api:http://my-cloud-controller.com"); "vcap.application.cf_api:http://my-cloud-controller.com");
this.context.refresh(); this.context.refresh();

Loading…
Cancel
Save