修改框架
This commit is contained in:
@@ -9,7 +9,7 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* 匿名访问不鉴权注解
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
@Target({ ElementType.METHOD, ElementType.TYPE })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* 数据权限过滤注解
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.quoted.common.enums.DataSourceType;
|
||||
*
|
||||
* 优先级:先方法,后类,如果方法覆盖了类上的数据源类型,以方法的为准,否则以类上的为准
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
@Target({ ElementType.METHOD, ElementType.TYPE })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.quoted.common.utils.poi.ExcelHandlerAdapter;
|
||||
/**
|
||||
* 自定义导出Excel数据注解
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* Excel注解集
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
@Target(ElementType.FIELD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.quoted.common.enums.OperatorType;
|
||||
/**
|
||||
* 自定义操作日志记录注解
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*
|
||||
*/
|
||||
@Target({ ElementType.PARAMETER, ElementType.METHOD })
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.quoted.common.enums.LimitType;
|
||||
/**
|
||||
* 限流注解
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* 自定义注解防止表单重复提交
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*
|
||||
*/
|
||||
@Inherited
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.quoted.common.enums.DesensitizedType;
|
||||
/**
|
||||
* 数据脱敏注解
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
|
||||
+39
-42
@@ -5,79 +5,80 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 读取项目相关配置
|
||||
*
|
||||
* @author ruoyi
|
||||
* <p>
|
||||
* quoted
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "ruoyi")
|
||||
public class RuoYiConfig
|
||||
{
|
||||
/** 项目名称 */
|
||||
@ConfigurationProperties(prefix = "quoted")
|
||||
public class QuotedConfig {
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/** 版本 */
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/** 版权年份 */
|
||||
/**
|
||||
* 版权年份
|
||||
*/
|
||||
private String copyrightYear;
|
||||
|
||||
/** 上传路径 */
|
||||
/**
|
||||
* 上传路径
|
||||
*/
|
||||
private static String profile;
|
||||
|
||||
/** 获取地址开关 */
|
||||
/**
|
||||
* 获取地址开关
|
||||
*/
|
||||
private static boolean addressEnabled;
|
||||
|
||||
/** 验证码类型 */
|
||||
/**
|
||||
* 验证码类型
|
||||
*/
|
||||
private static String captchaType;
|
||||
|
||||
public String getName()
|
||||
{
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getVersion()
|
||||
{
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version)
|
||||
{
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getCopyrightYear()
|
||||
{
|
||||
public String getCopyrightYear() {
|
||||
return copyrightYear;
|
||||
}
|
||||
|
||||
public void setCopyrightYear(String copyrightYear)
|
||||
{
|
||||
public void setCopyrightYear(String copyrightYear) {
|
||||
this.copyrightYear = copyrightYear;
|
||||
}
|
||||
|
||||
public static String getProfile()
|
||||
{
|
||||
public static String getProfile() {
|
||||
return profile;
|
||||
}
|
||||
|
||||
public void setProfile(String profile)
|
||||
{
|
||||
RuoYiConfig.profile = profile;
|
||||
public void setProfile(String profile) {
|
||||
QuotedConfig.profile = profile;
|
||||
}
|
||||
|
||||
public static boolean isAddressEnabled()
|
||||
{
|
||||
public static boolean isAddressEnabled() {
|
||||
return addressEnabled;
|
||||
}
|
||||
|
||||
public void setAddressEnabled(boolean addressEnabled)
|
||||
{
|
||||
RuoYiConfig.addressEnabled = addressEnabled;
|
||||
public void setAddressEnabled(boolean addressEnabled) {
|
||||
QuotedConfig.addressEnabled = addressEnabled;
|
||||
}
|
||||
|
||||
public static String getCaptchaType() {
|
||||
@@ -85,38 +86,34 @@ public class RuoYiConfig
|
||||
}
|
||||
|
||||
public void setCaptchaType(String captchaType) {
|
||||
RuoYiConfig.captchaType = captchaType;
|
||||
QuotedConfig.captchaType = captchaType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导入上传路径
|
||||
*/
|
||||
public static String getImportPath()
|
||||
{
|
||||
public static String getImportPath() {
|
||||
return getProfile() + "/import";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取头像上传路径
|
||||
*/
|
||||
public static String getAvatarPath()
|
||||
{
|
||||
public static String getAvatarPath() {
|
||||
return getProfile() + "/avatar";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取下载路径
|
||||
*/
|
||||
public static String getDownloadPath()
|
||||
{
|
||||
public static String getDownloadPath() {
|
||||
return getProfile() + "/download/";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取上传路径
|
||||
*/
|
||||
public static String getUploadPath()
|
||||
{
|
||||
public static String getUploadPath() {
|
||||
return getProfile() + "/upload";
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -16,7 +16,7 @@ import com.quoted.common.utils.SecurityUtils;
|
||||
/**
|
||||
* 数据脱敏序列化过滤
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class SensitiveJsonSerializer extends JsonSerializer<String> implements ContextualSerializer
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.constant;
|
||||
/**
|
||||
* 缓存的key 常量
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class CacheConstants
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import io.jsonwebtoken.Claims;
|
||||
/**
|
||||
* 通用常量信息
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class Constants
|
||||
{
|
||||
@@ -158,18 +158,18 @@ public class Constants
|
||||
/**
|
||||
* 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全)
|
||||
*/
|
||||
public static final String[] JSON_WHITELIST_STR = { "com.ruoyi" };
|
||||
public static final String[] JSON_WHITELIST_STR = { "com.quoted" };
|
||||
|
||||
/**
|
||||
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
|
||||
*/
|
||||
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi.quartz.task" };
|
||||
public static final String[] JOB_WHITELIST_STR = { "com.quoted.quartz.task" };
|
||||
|
||||
/**
|
||||
* 定时任务违规的字符
|
||||
*/
|
||||
public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
|
||||
"org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config", "com.ruoyi.generator" };
|
||||
"org.springframework", "org.apache", "com.quoted.common.utils.file", "com.quoted.common.config", "com.quoted.generator" };
|
||||
|
||||
/**
|
||||
* 部门相关常量
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.constant;
|
||||
/**
|
||||
* 代码生成通用常量
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class GenConstants
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.constant;
|
||||
/**
|
||||
* 返回状态码
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class HttpStatus
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.constant;
|
||||
/**
|
||||
* 任务调度通用常量
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class ScheduleConstants
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.constant;
|
||||
/**
|
||||
* 用户常量信息
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class UserConstants
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.quoted.common.utils.sql.SqlUtil;
|
||||
/**
|
||||
* web层通用数据处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class BaseController
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.quoted.common.utils.StringUtils;
|
||||
/**
|
||||
* 操作消息提醒
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class AjaxResult extends HashMap<String, Object>
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
/**
|
||||
* Entity基类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class BaseEntity implements Serializable
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.quoted.common.constant.HttpStatus;
|
||||
/**
|
||||
* 响应信息主体
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class R<T> implements Serializable
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.List;
|
||||
/**
|
||||
* Tree基类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class TreeEntity extends BaseEntity
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.quoted.common.utils.StringUtils;
|
||||
/**
|
||||
* Treeselect树结构实体类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class TreeSelect implements Serializable
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.quoted.common.core.domain.BaseEntity;
|
||||
/**
|
||||
* 部门表 sys_dept
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class SysDept extends BaseEntity
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.quoted.common.core.domain.BaseEntity;
|
||||
/**
|
||||
* 字典数据表 sys_dict_data
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class SysDictData extends BaseEntity
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.quoted.common.core.domain.BaseEntity;
|
||||
/**
|
||||
* 字典类型表 sys_dict_type
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class SysDictType extends BaseEntity
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.quoted.common.core.domain.BaseEntity;
|
||||
/**
|
||||
* 菜单权限表 sys_menu
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class SysMenu extends BaseEntity
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.quoted.common.core.domain.BaseEntity;
|
||||
/**
|
||||
* 角色表 sys_role
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class SysRole extends BaseEntity
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ import com.quoted.common.xss.Xss;
|
||||
/**
|
||||
* 用户对象 sys_user
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class SysUser extends BaseEntity
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.core.domain.model;
|
||||
/**
|
||||
* 用户登录对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class LoginBody
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Set;
|
||||
/**
|
||||
* 登录用户身份权限
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class LoginUser implements UserDetails
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.core.domain.model;
|
||||
/**
|
||||
* 用户注册对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class RegisterBody extends LoginBody
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.quoted.common.utils.StringUtils;
|
||||
/**
|
||||
* 分页数据
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class PageDomain
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.List;
|
||||
/**
|
||||
* 表格分页数据对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class TableDataInfo implements Serializable
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.quoted.common.utils.ServletUtils;
|
||||
/**
|
||||
* 表格数据处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class TableSupport
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
|
||||
/**
|
||||
* spring redis 工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
**/
|
||||
@SuppressWarnings(value = { "unchecked", "rawtypes" })
|
||||
@Component
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.quoted.common.utils.StringUtils;
|
||||
/**
|
||||
* 字符集工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class CharsetKit
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.quoted.common.utils.StringUtils;
|
||||
/**
|
||||
* 类型转换器
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class Convert
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.quoted.common.utils.StringUtils;
|
||||
/**
|
||||
* 字符串格式化
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class StrFormatter
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.enums;
|
||||
/**
|
||||
* 操作状态
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*
|
||||
*/
|
||||
public enum BusinessStatus
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.enums;
|
||||
/**
|
||||
* 业务操作类型
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public enum BusinessType
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.enums;
|
||||
/**
|
||||
* 数据源
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public enum DataSourceType
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.quoted.common.utils.DesensitizedUtil;
|
||||
/**
|
||||
* 脱敏类型
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public enum DesensitizedType
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.springframework.lang.Nullable;
|
||||
/**
|
||||
* 请求方式
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public enum HttpMethod
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.enums;
|
||||
/**
|
||||
* 限流类型
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
|
||||
public enum LimitType
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.enums;
|
||||
/**
|
||||
* 操作人类别
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public enum OperatorType
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.enums;
|
||||
/**
|
||||
* 用户状态
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public enum UserStatus
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.exception;
|
||||
/**
|
||||
* 演示模式异常
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class DemoModeException extends RuntimeException
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.exception;
|
||||
/**
|
||||
* 全局异常
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class GlobalException extends RuntimeException
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.exception;
|
||||
/**
|
||||
* 业务异常
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public final class ServiceException extends RuntimeException
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.exception;
|
||||
/**
|
||||
* 工具类异常
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class UtilException extends RuntimeException
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.quoted.common.utils.StringUtils;
|
||||
/**
|
||||
* 基础异常
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class BaseException extends RuntimeException
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.quoted.common.exception.base.BaseException;
|
||||
/**
|
||||
* 文件信息异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class FileException extends BaseException
|
||||
{
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.quoted.common.exception.file;
|
||||
/**
|
||||
* 文件名称超长限制异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class FileNameLengthLimitExceededException extends FileException
|
||||
{
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.quoted.common.exception.file;
|
||||
/**
|
||||
* 文件名大小限制异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class FileSizeLimitExceededException extends FileException
|
||||
{
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import java.io.PrintWriter;
|
||||
/**
|
||||
* 文件上传异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class FileUploadException extends Exception
|
||||
{
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 文件上传无效扩展名异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class InvalidExtensionException extends FileUploadException
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.exception.job;
|
||||
/**
|
||||
* 计划策略异常
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class TaskException extends Exception
|
||||
{
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.quoted.common.exception.user;
|
||||
/**
|
||||
* 黑名单IP异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class BlackListException extends UserException
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.exception.user;
|
||||
/**
|
||||
* 验证码错误异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class CaptchaException extends UserException
|
||||
{
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.quoted.common.exception.user;
|
||||
/**
|
||||
* 验证码失效异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class CaptchaExpireException extends UserException
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.quoted.common.exception.base.BaseException;
|
||||
/**
|
||||
* 用户信息异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class UserException extends BaseException
|
||||
{
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.quoted.common.exception.user;
|
||||
/**
|
||||
* 用户不存在异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class UserNotExistsException extends UserException
|
||||
{
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.quoted.common.exception.user;
|
||||
/**
|
||||
* 用户密码不正确或不符合规范异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class UserPasswordNotMatchException extends UserException
|
||||
{
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.quoted.common.exception.user;
|
||||
/**
|
||||
* 用户错误最大次数异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class UserPasswordRetryLimitExceedException extends UserException
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.alibaba.fastjson2.filter.SimplePropertyPreFilter;
|
||||
/**
|
||||
* 排除JSON敏感属性
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class PropertyPreExcludeFilter extends SimplePropertyPreFilter
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
/**
|
||||
* 防盗链过滤器
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class RefererFilter implements Filter
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.quoted.common.utils.StringUtils;
|
||||
/**
|
||||
* Repeatable 过滤器
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class RepeatableFilter implements Filter
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.quoted.common.constant.Constants;
|
||||
/**
|
||||
* 构建可重复读取inputStream的request
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ import com.quoted.common.enums.HttpMethod;
|
||||
/**
|
||||
* 防止XSS攻击的过滤器
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class XssFilter implements Filter
|
||||
{
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import com.quoted.common.utils.html.EscapeUtil;
|
||||
/**
|
||||
* XSS过滤处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.math.RoundingMode;
|
||||
/**
|
||||
* 精确的浮点数运算
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class Arith
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
/**
|
||||
* 时间工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.utils;
|
||||
/**
|
||||
* 脱敏工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class DesensitizedUtil
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.quoted.common.utils.spring.SpringUtils;
|
||||
/**
|
||||
* 字典工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class DictUtils
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
/**
|
||||
* 错误信息处理类。
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class ExceptionUtil
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.utils;
|
||||
/**
|
||||
* 处理并记录日志文件
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class LogUtils
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.quoted.common.utils.spring.SpringUtils;
|
||||
/**
|
||||
* 获取i18n资源文件
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class MessageUtils
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.quoted.common.utils.sql.SqlUtil;
|
||||
/**
|
||||
* 分页工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class PageUtils extends PageHelper
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ import com.quoted.common.exception.ServiceException;
|
||||
/**
|
||||
* 安全服务工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class SecurityUtils
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ import com.quoted.common.core.text.Convert;
|
||||
/**
|
||||
* 客户端工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class ServletUtils
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.quoted.common.core.text.StrFormatter;
|
||||
/**
|
||||
* 字符串工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class StringUtils extends org.apache.commons.lang3.StringUtils
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.slf4j.LoggerFactory;
|
||||
/**
|
||||
* 线程相关工具类.
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class Threads
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.regex.Pattern;
|
||||
/**
|
||||
* Bean 工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class BeanUtils extends org.springframework.beans.BeanUtils
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ import javax.validation.Validator;
|
||||
/**
|
||||
* bean对象属性验证
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class BeanValidators
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
/**
|
||||
* 文件类型工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class FileTypeUtils
|
||||
{
|
||||
|
||||
@@ -4,9 +4,10 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.quoted.common.config.QuotedConfig;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.quoted.common.config.RuoYiConfig;
|
||||
import com.quoted.common.constant.Constants;
|
||||
import com.quoted.common.exception.file.FileNameLengthLimitExceededException;
|
||||
import com.quoted.common.exception.file.FileSizeLimitExceededException;
|
||||
@@ -19,7 +20,7 @@ import com.quoted.common.utils.uuid.Seq;
|
||||
/**
|
||||
* 文件上传工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class FileUploadUtils
|
||||
{
|
||||
@@ -36,7 +37,7 @@ public class FileUploadUtils
|
||||
/**
|
||||
* 默认上传的地址
|
||||
*/
|
||||
private static String defaultBaseDir = RuoYiConfig.getProfile();
|
||||
private static String defaultBaseDir = QuotedConfig.getProfile();
|
||||
|
||||
public static void setDefaultBaseDir(String defaultBaseDir)
|
||||
{
|
||||
@@ -170,7 +171,7 @@ public class FileUploadUtils
|
||||
|
||||
public static final String getPathFileName(String uploadDir, String fileName) throws IOException
|
||||
{
|
||||
int dirLastIndex = RuoYiConfig.getProfile().length() + 1;
|
||||
int dirLastIndex = QuotedConfig.getProfile().length() + 1;
|
||||
String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
|
||||
return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
|
||||
}
|
||||
|
||||
@@ -11,10 +11,11 @@ import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.quoted.common.config.QuotedConfig;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import com.quoted.common.config.RuoYiConfig;
|
||||
import com.quoted.common.constant.Constants;
|
||||
import com.quoted.common.utils.DateUtils;
|
||||
import com.quoted.common.utils.StringUtils;
|
||||
@@ -23,7 +24,7 @@ import com.quoted.common.utils.uuid.IdUtils;
|
||||
/**
|
||||
* 文件处理工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class FileUtils
|
||||
{
|
||||
@@ -74,7 +75,7 @@ public class FileUtils
|
||||
*/
|
||||
public static String writeImportBytes(byte[] data) throws IOException
|
||||
{
|
||||
return writeBytes(data, RuoYiConfig.getImportPath());
|
||||
return writeBytes(data, QuotedConfig.getImportPath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,17 +6,18 @@ import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.quoted.common.config.QuotedConfig;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import com.quoted.common.config.RuoYiConfig;
|
||||
import com.quoted.common.constant.Constants;
|
||||
import com.quoted.common.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* 图片处理工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class ImageUtils
|
||||
{
|
||||
@@ -79,7 +80,7 @@ public class ImageUtils
|
||||
else
|
||||
{
|
||||
// 本机地址
|
||||
String localPath = RuoYiConfig.getProfile();
|
||||
String localPath = QuotedConfig.getProfile();
|
||||
String downloadPath = localPath + StringUtils.substringAfter(url, Constants.RESOURCE_PREFIX);
|
||||
in = new FileInputStream(downloadPath);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.quoted.common.utils.file;
|
||||
/**
|
||||
* 媒体类型工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class MimeTypeUtils
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.quoted.common.utils.StringUtils;
|
||||
/**
|
||||
* 转义和反转义工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class EscapeUtil
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.regex.Pattern;
|
||||
/**
|
||||
* HTML过滤器,用于去除XSS漏洞隐患。
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public final class HTMLFilter
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.slf4j.LoggerFactory;
|
||||
/**
|
||||
* 通用http工具封装
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class HttpHelper
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.http.MediaType;
|
||||
/**
|
||||
* 通用http发送方法
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class HttpUtils
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ import nl.basjes.parse.useragent.UserAgentAnalyzer;
|
||||
/**
|
||||
* UserAgent解析工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class UserAgentUtils
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.quoted.common.utils.ip;
|
||||
|
||||
import com.quoted.common.config.QuotedConfig;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.quoted.common.config.RuoYiConfig;
|
||||
import com.quoted.common.constant.Constants;
|
||||
import com.quoted.common.utils.StringUtils;
|
||||
import com.quoted.common.utils.http.HttpUtils;
|
||||
@@ -12,7 +12,7 @@ import com.quoted.common.utils.http.HttpUtils;
|
||||
/**
|
||||
* 获取地址类
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class AddressUtils
|
||||
{
|
||||
@@ -31,7 +31,7 @@ public class AddressUtils
|
||||
{
|
||||
return "内网IP";
|
||||
}
|
||||
if (RuoYiConfig.isAddressEnabled())
|
||||
if (QuotedConfig.isAddressEnabled())
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.quoted.common.utils.StringUtils;
|
||||
/**
|
||||
* 获取IP方法
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class IpUtils
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.apache.poi.ss.usermodel.Workbook;
|
||||
/**
|
||||
* Excel数据格式处理适配器
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public interface ExcelHandlerAdapter
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
* return ExcelUtil.exportMultiSheet(sheets);
|
||||
* </pre>
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class ExcelSheet<T>
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ import com.quoted.common.annotation.Excel;
|
||||
import com.quoted.common.annotation.Excel.ColumnType;
|
||||
import com.quoted.common.annotation.Excel.Type;
|
||||
import com.quoted.common.annotation.Excels;
|
||||
import com.quoted.common.config.RuoYiConfig;
|
||||
import com.quoted.common.config.QuotedConfig;
|
||||
import com.quoted.common.core.domain.AjaxResult;
|
||||
import com.quoted.common.core.text.Convert;
|
||||
import com.quoted.common.exception.UtilException;
|
||||
@@ -89,7 +89,7 @@ import com.quoted.common.utils.reflect.ReflectUtils;
|
||||
/**
|
||||
* Excel相关处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* quoted
|
||||
*/
|
||||
public class ExcelUtil<T>
|
||||
{
|
||||
@@ -1620,7 +1620,7 @@ public class ExcelUtil<T>
|
||||
*/
|
||||
public String getAbsoluteFile(String filename)
|
||||
{
|
||||
String downloadPath = RuoYiConfig.getDownloadPath() + filename;
|
||||
String downloadPath = QuotedConfig.getDownloadPath() + filename;
|
||||
File desc = new File(downloadPath);
|
||||
if (!desc.getParentFile().exists())
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user