org.zodiac.autoconfigure.template.velocity.condition.ConditionalOnVelocityTemplateEnabled Maven / Gradle / Ivy
package org.zodiac.autoconfigure.template.velocity.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({ConditionalOnVelocityTemplateEnabled.OnVelocityTemplateEnabledCondition.class})
public @interface ConditionalOnVelocityTemplateEnabled {
class OnVelocityTemplateEnabledCondition extends AllNestedConditions {
public OnVelocityTemplateEnabledCondition() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnClass(value = {org.zodiac.template.velocity.VelocityTemplateEngine.class})
static class FoundClass {
}
@ConditionalOnProperty(
value = org.zodiac.template.velocity.constants.VelocityTemplateSystemPropertiesConstants.SPRING_TEMPLATE_VELOCITY_ENABLED,
havingValue = "true")
static class FoundProperty {
}
}
}