com.eworkcloud.caffeine.CaffeineConfiguration Maven / Gradle / Ivy
package com.eworkcloud.caffeine;
import com.github.benmanes.caffeine.cache.Caffeine;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.caffeine.CaffeineCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.annotation.Resource;
import java.util.concurrent.TimeUnit;
@Configuration
@EnableCaching
@EnableConfigurationProperties(CaffeineProperties.class)
public class CaffeineConfiguration {
@Resource
private CaffeineProperties caffeineProperties;
@Bean
public CaffeineCacheManager caffeineCacheManager() {
Caffeine
© 2015 - 2024 Weber Informatics LLC | Privacy Policy