feat:把hutool的jwt直接放入util中

This commit is contained in:
曾文豪
2024-08-23 11:38:29 +08:00
parent e57cd5e1c8
commit 856a9f01dd
18 changed files with 1954 additions and 9 deletions

View File

@@ -0,0 +1,38 @@
package com.tiesheng.util.jwt;
import cn.hutool.core.exceptions.ExceptionUtil;
import cn.hutool.core.util.StrUtil;
/**
* JWT异常
*
* @author looly
* @since 5.7.0
*/
public class JWTException extends RuntimeException {
private static final long serialVersionUID = 1L;
public JWTException(Throwable e) {
super(ExceptionUtil.getMessage(e), e);
}
public JWTException(String message) {
super(message);
}
public JWTException(String messageTemplate, Object... params) {
super(StrUtil.format(messageTemplate, params));
}
public JWTException(String message, Throwable cause) {
super(message, cause);
}
public JWTException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) {
super(message, throwable, enableSuppression, writableStackTrace);
}
public JWTException(Throwable throwable, String messageTemplate, Object... params) {
super(StrUtil.format(messageTemplate, params), throwable);
}
}