/*
 * Copyright 2013-2014 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.cloud.netflix.hystrix;

import org.springframework.boot.actuate.autoconfigure.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.netflix.hystrix.Hystrix;

/**
 * Auto configuration for Hystrix.
 *
 * @author Christian Dupuis
 */
@Configuration
@ConditionalOnClass({ Hystrix.class, HealthIndicator.class })
@ConditionalOnProperty(value = "health.hystrix.enabled", matchIfMissing = true)
@AutoConfigureAfter({ HealthIndicatorAutoConfiguration.class })
public class HystrixAutoConfiguration {

	@Bean
	public HystrixHealthIndicator hystrixHealthIndicator() {
		return new HystrixHealthIndicator();
	}

}

@@ -1040,16 +1040,92 @@
 operty;%0A
+import org.springframework.boot.context.properties.ConfigurationProperties;%0A
 import o
@@ -1418,16 +1418,80 @@
 lass %7D)%0A
+@AutoConfigureAfter(%7B HealthIndicatorAutoConfiguration.class %7D)%0A
 @Conditi
@@ -1566,72 +1566,8 @@
 ue)%0A
-@AutoConfigureAfter(%7B HealthIndicatorAutoConfiguration.class %7D)%0A
 publ
@@ -1710,11 +1710,330 @@
 r();%0A%09%7D%0A
+%09%0A%09@ConfigurationProperties(%22health.hystrix%22)%0A%09public static class Health %7B%0A%09%09/**%0A%09%09 * Flag to inidicate that the hystrix health indicator should be installed. %0A%09%09 */%0A%09%09boolean enabled;%0A%0A%09%09public boolean isEnabled() %7B%0A%09%09%09return enabled;%0A%09%09%7D%0A%0A%09%09public void setEnabled(boolean enabled) %7B%0A%09%09%09this.enabled = enabled;%0A%09%09%7D%0A%09%7D
 %0A%7D%0A

Add health.config for documentation purposes only