org.zodiac.autoconfigure.server.condition.ConditionalOnSimpleHttpServer Maven / Gradle / Ivy
package org.zodiac.autoconfigure.server.condition;
import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Conditional;
import org.zodiac.commons.constants.SystemPropertiesConstants;
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({ConditionalOnSimpleHttpServer.OnSimpleWebServerCondition.class})
public @interface ConditionalOnSimpleHttpServer {
class OnSimpleWebServerCondition extends AllNestedConditions {
public OnSimpleWebServerCondition() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnProperty(value = SystemPropertiesConstants.Zodiac.SERVER_NETTY_HTTP_TYPE, havingValue = "simple", matchIfMissing = true)
static class FoundProperty {
}
}
}