org.zodiac.autoconfigure.eureka.condition.ConditionalOnEurekaAvailable Maven / Gradle / Ivy
package org.zodiac.autoconfigure.eureka.condition;
import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Conditional;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
@Conditional({ConditionalOnEurekaAvailable.OnEurekaAvailableCondition.class})
public @interface ConditionalOnEurekaAvailable {
class OnEurekaAvailableCondition extends AllNestedConditions {
public OnEurekaAvailableCondition() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnClass(value = {com.netflix.discovery.EurekaClientConfig.class, org.zodiac.eureka.base.EurekaApplicationService.class})
static class FoundClass {
}
@ConditionalOnProperty(value = org.zodiac.eureka.base.constants.EurekaBaseSystemPropertiesConstants.EUREKA_ENABLED, havingValue = "true")
static class FoundProperty {
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy