All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.autoconfigure.cache.condition.ConditionalOnHttpCacheEnabled Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.autoconfigure.cache.condition;

import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
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({ConditionalOnHttpCacheEnabled.OnHttpCacheCondition.class})
public @interface ConditionalOnHttpCacheEnabled {

    class OnHttpCacheCondition extends AllNestedConditions {

        public OnHttpCacheCondition() {
            super(ConfigurationPhase.REGISTER_BEAN);
        }

        @ConditionalOnProperty(value = "spring.cache.http.enabled", havingValue = "true", matchIfMissing = true)
        static class FoundProperty {

        }

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy