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