google本地缓存LoadingCache
1.需要引入相关pom依赖(项目源码参考:https://github.com/licunzhi/dream_on_sakura_rain/tree/master/loadingcache_demo)
com.google.guava guava 24.1-jre2.在项目启动的时候注册组件Bean(使用注解@Configuration和@Bean)
@Configuration
public class MyCacheConfiguration {
private static final int EXPIRE_SECONDS = 86400;
/**
* 定义token缓存, 默认最大数量为3000
*/