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

org.zodiac.autoconfigure.cache.http.HttpCacheableAutoConfiguration Maven / Gradle / Ivy

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

import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.zodiac.autoconfigure.cache.condition.ConditionalOnHttpCacheEnabled;

@SpringBootConfiguration
@ConditionalOnHttpCacheEnabled
@AutoConfigureAfter(value = {CacheAutoConfiguration.class})
@ConditionalOnClass(value = {org.zodiac.cache.http.HttpCacheable.class})
@ConditionalOnBean(value = {org.springframework.cache.CacheManager.class})
public class HttpCacheableAutoConfiguration {

    public HttpCacheableAutoConfiguration() {
    }

    @Bean
    @ConfigurationProperties(prefix = "spring.cache.http", ignoreInvalidFields = true)
    protected HttpCacheableProperties httpCacheProperties() {
        return new HttpCacheableProperties();
    }

    @Bean
    @ConditionalOnMissingBean
    protected org.zodiac.cache.http.HttpCacheService httpCacheService(HttpCacheableProperties httpCacheProperties, org.springframework.cache.CacheManager cacheManager) {
        return new org.zodiac.cache.http.HttpCacheService(httpCacheProperties, cacheManager);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy