From 96f38967dccb07f473819b7e3465efe9446946aa Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期三, 08 一月 2025 11:33:49 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/eyes

---
 common/src/main/java/com/jilongda/common/security/JwtTokenUtils.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/src/main/java/com/jilongda/common/security/JwtTokenUtils.java b/common/src/main/java/com/jilongda/common/security/JwtTokenUtils.java
index 5021e54..4786ba1 100644
--- a/common/src/main/java/com/jilongda/common/security/JwtTokenUtils.java
+++ b/common/src/main/java/com/jilongda/common/security/JwtTokenUtils.java
@@ -214,7 +214,7 @@
     public static Boolean validateToken(String token, String username) {
         String userName = getUsername(token);
         if (!StringUtils.hasLength(userName)) {
-            throw new IllegalArgumentException("请求令牌无效");
+            throw new ServiceException(401,"请求令牌无效");
         }
         return (userName.equals(username) && !isTokenExpired(token));
     }
@@ -302,7 +302,7 @@
         try {
             token = new String(Base64Utils.decode(token.getBytes()));
         } catch (IllegalArgumentException e) {
-            throw new IllegalArgumentException("无效的令牌");
+            throw new ServiceException(401,"无效的令牌");
         }
         return token;
     }

--
Gitblit v1.7.1