com.eworkcloud.guava.GuavaConfiguration Maven / Gradle / Ivy
package com.eworkcloud.guava;
import com.google.common.cache.CacheBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.guava.GuavaCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.annotation.Resource;
import java.util.concurrent.TimeUnit;
@Configuration
@EnableCaching
@EnableConfigurationProperties(GuavaProperties.class)
public class GuavaConfiguration {
@Resource
private GuavaProperties guavaProperties;
@Bean
public GuavaCacheManager guavaCacheManager() {
CacheBuilder
© 2015 - 2024 Weber Informatics LLC | Privacy Policy