refactor: 代码重构,移除 jjwt 的 JWT 库,使用 HuTool 工具实现 JWT 生成(默认jjwt库)、验证和解析。

This commit is contained in:
hxr
2024-01-20 23:19:02 +08:00
parent b1a4bb7109
commit 9403479af7
39 changed files with 254 additions and 315 deletions

View File

@@ -59,10 +59,10 @@ mybatis-plus:
# 认证配置
jwt:
# 签署密钥
secret-key: SecretKey012345678901234567890123456789012345678901234567890123456789
# 密钥
key: SecretKey012345678901234567890123456789012345678901234567890123456789
# token 过期时间(单位:秒)
expiration: 7200
ttl: 7200
oss:
# OSS 类型 (目前支持aliyun、minio)

View File

@@ -59,10 +59,10 @@ mybatis-plus:
# 认证配置
jwt:
# 签署密钥
secret-key: SecretKey012345678901234567890123456789012345678901234567890123456789
# 密钥
key: SecretKey012345678901234567890123456789012345678901234567890123456789
# token 过期时间(单位:秒)
expiration: 7200
ttl: 7200
oss:
# OSS 类型 (目前支持aliyun、minio)

View File

@@ -44,7 +44,7 @@
LEFT JOIN sys_role_menu t2 ON t1.id = t2.menu_id
LEFT JOIN sys_role t3 ON t2.role_id = t3.id
WHERE
t1.type != '${@com.youlai.system.common.enums.MenuTypeEnum@BUTTON.getValue()}'
t1.type != '${@com.youlai.system.enums.MenuTypeEnum@BUTTON.getValue()}'
ORDER BY t1.sort asc
</select>
@@ -57,7 +57,7 @@
INNER JOIN sys_role_menu t2 ON t1.id = t2.menu_id
INNER JOIN sys_role t3 ON t3.id = t2.role_id
WHERE
t1.type = '${@com.youlai.system.common.enums.MenuTypeEnum@BUTTON.getValue()}'
t1.type = '${@com.youlai.system.enums.MenuTypeEnum@BUTTON.getValue()}'
AND t1.perm IS NOT NULL
<choose>
<when test="roles!=null and roles.size()>0">

View File

@@ -33,7 +33,7 @@
INNER JOIN sys_role t2 ON t1.role_id = t2.id AND t2.deleted = 0
INNER JOIN sys_menu t3 ON t1.menu_id = t3.id
WHERE
type = '${@com.youlai.system.common.enums.MenuTypeEnum@BUTTON.getValue()}'
type = '${@com.youlai.system.enums.MenuTypeEnum@BUTTON.getValue()}'
<if test="roleCode!=null and roleCode.trim() neq ''">
AND t2.`code` = #{roleCode}
</if>