Default management.cloudfoundry.enabled to true

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

See gh-7108
This commit is contained in:
Phillip Webb 2016-11-04 16:43:38 -07:00
parent a77cfc3b0e
commit 6c76353682
2 changed files with 1 additions and 3 deletions

View File

@ -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)

View File

@ -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();