parent
e2cb5afc2f
commit
216cec0dfd
@ -0,0 +1,13 @@
|
||||
package cc.aspark.constant;
|
||||
|
||||
public class MessageConstant {
|
||||
|
||||
public static final String PASSWORD_ERROR = "密码错误";
|
||||
public static final String ACCOUNT_NOT_FOUND = "账号不存在";
|
||||
public static final String UNKNOWN_ERROR = "未知错误";
|
||||
public static final String USER_NOT_LOGIN = "用户未登录";
|
||||
public static final String LOGIN_FAILED = "登录失败";
|
||||
public static final String DELETE_FAILED = "删除失败";
|
||||
public static final String INVALID_INPUT = "输入无效";
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package cc.aspark.context;
|
||||
|
||||
public class BaseContext {
|
||||
|
||||
public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();
|
||||
|
||||
public static void setCurrentId(Long id) {
|
||||
threadLocal.set(id);
|
||||
}
|
||||
|
||||
public static Long getCurrentId() {
|
||||
return threadLocal.get();
|
||||
}
|
||||
|
||||
public static void removeCurrentId() {
|
||||
threadLocal.remove();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package cc.aspark.properties;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "jwt")
|
||||
@Data
|
||||
public class JwtProperties {
|
||||
|
||||
/**
|
||||
* 管理端员工生成jwt令牌相关配置
|
||||
*/
|
||||
private String secretKey;
|
||||
private long ttl;
|
||||
private String tokenName;
|
||||
|
||||
}
|
Loading…
Reference in new issue