From e6f531aa73c9551a95fc5d4657b7670e9a21f073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=82=85=E5=93=A5?= Date: Mon, 23 Oct 2023 16:33:39 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E7=BC=93=E5=AD=98=E8=BF=87?= =?UTF-8?q?=E6=9C=9F=E6=97=B6=E9=97=B4=20TimeUnit.SECONDS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cn/bugstack/chatglm/utils/BearerTokenUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/bugstack/chatglm/utils/BearerTokenUtils.java b/src/main/java/cn/bugstack/chatglm/utils/BearerTokenUtils.java index 57954fc..7d9367d 100644 --- a/src/main/java/cn/bugstack/chatglm/utils/BearerTokenUtils.java +++ b/src/main/java/cn/bugstack/chatglm/utils/BearerTokenUtils.java @@ -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 cache = CacheBuilder.newBuilder() - .expireAfterWrite(expireMillis - (60 * 1000), TimeUnit.MINUTES) + .expireAfterWrite(expireMillis - (60 * 1000L), TimeUnit.SECONDS) .build(); /** -- GitLab