未验证 提交 e6f531aa 编写于 作者: 小傅哥 提交者: GitHub

fix:缓存过期时间 TimeUnit.SECONDS

上级 5ac9b96e
......@@ -22,11 +22,11 @@ import java.util.concurrent.TimeUnit;
public class BearerTokenUtils {
// 过期时间;默认30分钟
private static final int expireMillis = 30 * 60 * 1000;
private static final long expireMillis = 30 * 60 * 1000L;
// 缓存服务
public static Cache<String, String> cache = CacheBuilder.newBuilder()
.expireAfterWrite(expireMillis - (60 * 1000), TimeUnit.MINUTES)
.expireAfterWrite(expireMillis - (60 * 1000L), TimeUnit.SECONDS)
.build();
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册