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

com.github.bootfastconfig.cache.CacheAuotConfig Maven / Gradle / Ivy

Go to download

Parent pom providing dependency and plugin management for applications built with Maven

The newest version!
package com.github.bootfastconfig.cache;


import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.bootfastconfig.cache.caffeine.CaffeineConfig;
import com.github.bootfastconfig.cache.properties.CacheConfigProperties;
import com.github.bootfastconfig.cache.properties.CaffeineCacheProperties;
import com.github.bootfastconfig.cache.properties.L2CacheProperties;
import com.github.bootfastconfig.cache.properties.RedissonProperties;
import com.github.bootfastconfig.cache.redis.RedisConfig;
import com.github.bootfastconfig.cache.redis.RedisJacksonConfig;
import com.github.bootfastconfig.cache.redis.RedissonConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.caffeine.CaffeineCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

/**
 * @author mister
 */
@EnableConfigurationProperties(CacheAuotConfig.class)
@ConditionalOnClass(value = {Caffeine.class, CaffeineCacheManager.class})
@Import({
        CachingConfigurer.class,
        CaffeineConfig.class,
        RedissonConfiguration.class,
        RedisJacksonConfig.class,
        RedisConfig.class
})
public class CacheAuotConfig {


    @Bean
    @ConfigurationProperties(prefix = "fastconfig.cache")
    public CacheConfigProperties getPropertiesCacheConfig() {
        return new CacheConfigProperties();
    }


    @Bean
    @ConfigurationProperties(prefix = "fastconfig.cache.l2-cache")
    public L2CacheProperties getL2CacheProperties() {
        return new L2CacheProperties();
    }


    @Bean
    @ConfigurationProperties(prefix = "fastconfig.cache.caffeine-cache")
    public CaffeineCacheProperties getCaffeineCacheProperties() {
        return new CaffeineCacheProperties();
    }

    @Bean
    @ConfigurationProperties(prefix = "spring.redis.redisson")
    public RedissonProperties redissonProperties() {
        return new RedissonProperties();
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy