|
@@ -4,6 +4,7 @@ import com.github.benmanes.caffeine.cache.CacheLoader;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @author liuam
|
|
* @author liuam
|
|
|
* @since 2018/11/7 0007 下午 16:32
|
|
* @since 2018/11/7 0007 下午 16:32
|
|
@@ -12,12 +13,7 @@ import org.springframework.context.annotation.Configuration;
|
|
|
public class CaffeineConfig {
|
|
public class CaffeineConfig {
|
|
|
@Bean
|
|
@Bean
|
|
|
public CacheLoader<Object, Object> cacheLoader() {
|
|
public CacheLoader<Object, Object> cacheLoader() {
|
|
|
- CacheLoader<Object, Object> cacheLoader = new CacheLoader<Object, Object>() {
|
|
|
|
|
- @Override
|
|
|
|
|
- public Object load(Object key) throws Exception {
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ CacheLoader<Object, Object> cacheLoader = (key) -> null;
|
|
|
return cacheLoader;
|
|
return cacheLoader;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|