common-core

This commit is contained in:
wol 2025-08-10 21:48:49 +08:00
parent ea916df3ce
commit c13efa788c
52 changed files with 470 additions and 485 deletions

View File

@ -9,6 +9,12 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<modules>
<module>wol-common-box</module>
<module>wol-common-core</module>
</modules>
<packaging>pom</packaging>
<artifactId>agileboot-common</artifactId>
<description>
@ -17,178 +23,78 @@
<dependencies>
<!-- Spring框架基本的核心工具 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<!-- SpringWeb模块 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<!-- spring security 安全认证 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- 自定义验证注解 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!--常用工具类 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!-- JSON工具类 -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-security</artifactId>-->
<!-- </dependency>-->
<!-- 文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>commons-fileupload</groupId>-->
<!-- <artifactId>commons-fileupload</artifactId>-->
<!-- </dependency>-->
<!-- yml解析器 -->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.yaml</groupId>-->
<!-- <artifactId>snakeyaml</artifactId>-->
<!-- </dependency>-->
<!-- Token生成与解析-->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>io.jsonwebtoken</groupId>-->
<!-- <artifactId>jjwt</artifactId>-->
<!-- </dependency>-->
<!-- Jaxb -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>javax.xml.bind</groupId>-->
<!-- <artifactId>jaxb-api</artifactId>-->
<!-- </dependency>-->
<!-- redis 缓存操作 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- pool 对象池 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-data-redis</artifactId>-->
<!-- </dependency>-->
<!-- 解析客户端操作系统、浏览器等 -->
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>eu.bitwalker</groupId>-->
<!-- <artifactId>UserAgentUtils</artifactId>-->
<!-- </dependency>-->
<!-- servlet包 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>it.ozimov</groupId>-->
<!-- <artifactId>embedded-redis</artifactId>-->
<!-- &lt;!&ndash; 不排除掉slf4j的话 会冲突&ndash;&gt;-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>org.slf4j</groupId>-->
<!-- <artifactId>slf4j-simple</artifactId>-->
<!-- </exclusion>-->
<!-- &lt;!&ndash; 排除掉guava依赖以本项目的guava依赖为准 &ndash;&gt;-->
<!-- <exclusion>-->
<!-- <groupId>com.google.guava</groupId>-->
<!-- <artifactId>guava</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-parameter-names</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>org.lionsoul</groupId>
<artifactId>ip2region</artifactId>
</dependency>
<dependency>
<groupId>it.ozimov</groupId>
<artifactId>embedded-redis</artifactId>
<!-- 不排除掉slf4j的话 会冲突-->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
<!-- 排除掉guava依赖以本项目的guava依赖为准 -->
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 多数据源 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.baomidou</groupId>-->
<!-- <artifactId>dynamic-datasource-spring-boot-starter</artifactId>-->
<!-- </dependency>-->
<!--ENC加密-->
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>2.1.1</version>
</dependency>
<!-- swagger注解 -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.github.ulisesbocchio</groupId>-->
<!-- <artifactId>jasypt-spring-boot-starter</artifactId>-->
<!-- <version>2.1.1</version>-->
<!-- </dependency>-->
</dependencies>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.agileboot</groupId>
<artifactId>agileboot-common</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>wol-common-box</artifactId>
<properties>
<revision>1.0.0</revision>
</properties>
<dependencyManagement>
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>com.agileboot</groupId>
<artifactId>wol-common-core</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.agileboot</groupId>
<artifactId>agileboot-common</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>wol-common-core</artifactId>
<dependencies>
<!-- Spring框架基本的核心工具 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<!-- servlet包 -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<!-- SpringWeb模块 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<!-- pool 对象池 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<!-- 自定义验证注解 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.lionsoul</groupId>
<artifactId>ip2region</artifactId>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
<!-- io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<!--常用工具类 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!-- JSON工具类 -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-parameter-names</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<!-- swagger注解 -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -1,4 +1,4 @@
package com.agileboot.common.annotation;
package com.agileboot.common.core.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.annotation;
package com.agileboot.common.core.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;

View File

@ -1,6 +1,6 @@
package com.agileboot.common.config;
package com.agileboot.common.core.config;
import com.agileboot.common.constant.Constants;
import com.agileboot.common.core.constant.Constants;
import java.io.File;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.core.base;
package com.agileboot.common.core.core.base;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.core.base;
package com.agileboot.common.core.core.base;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;

View File

@ -1,7 +1,7 @@
package com.agileboot.common.core.dto;
package com.agileboot.common.core.core.dto;
import com.agileboot.common.exception.ApiException;
import com.agileboot.common.exception.error.ErrorCode;
import com.agileboot.common.core.exception.ApiException;
import com.agileboot.common.core.exception.error.ErrorCode;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.core.page;
package com.agileboot.common.core.core.page;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

View File

@ -1,7 +1,7 @@
package com.agileboot.common.core.page;
package com.agileboot.common.core.core.page;
import cn.hutool.core.util.StrUtil;
import com.agileboot.common.utils.time.DatePickUtil;
import com.agileboot.common.core.utils.time.DatePickUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.core.page;
package com.agileboot.common.core.core.page;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.enums;
package com.agileboot.common.core.enums;
/**
* @author valarchie

View File

@ -1,9 +1,9 @@
package com.agileboot.common.enums;
package com.agileboot.common.core.enums;
import cn.hutool.core.convert.Convert;
import com.agileboot.common.exception.ApiException;
import com.agileboot.common.exception.error.ErrorCode;
import com.agileboot.common.enums.BasicEnum;
import com.agileboot.common.core.exception.ApiException;
import com.agileboot.common.core.exception.error.ErrorCode;
import com.agileboot.common.core.enums.BasicEnum;
import java.util.Objects;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.enums;
package com.agileboot.common.core.enums;
/**
* 字典类型 接口

View File

@ -1,8 +1,8 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.dictionary.CssTag;
import com.agileboot.common.enums.dictionary.Dictionary;
import com.agileboot.common.enums.DictionaryEnum;
import com.agileboot.common.core.enums.dictionary.CssTag;
import com.agileboot.common.core.enums.dictionary.Dictionary;
import com.agileboot.common.core.enums.DictionaryEnum;
/**
* 对应sys_operation_log的business_type

View File

@ -1,6 +1,6 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.BasicEnum;
import com.agileboot.common.core.enums.BasicEnum;
/**
* 系统配置

View File

@ -1,8 +1,8 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.dictionary.CssTag;
import com.agileboot.common.enums.dictionary.Dictionary;
import com.agileboot.common.enums.DictionaryEnum;
import com.agileboot.common.core.enums.dictionary.CssTag;
import com.agileboot.common.core.enums.dictionary.Dictionary;
import com.agileboot.common.core.enums.DictionaryEnum;
/**
* 对应sys_user的sex字段

View File

@ -1,8 +1,8 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.dictionary.CssTag;
import com.agileboot.common.enums.dictionary.Dictionary;
import com.agileboot.common.enums.DictionaryEnum;
import com.agileboot.common.core.enums.dictionary.CssTag;
import com.agileboot.common.core.enums.dictionary.Dictionary;
import com.agileboot.common.core.enums.DictionaryEnum;
/**
* 用户状态

View File

@ -1,6 +1,6 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.BasicEnum;
import com.agileboot.common.core.enums.BasicEnum;
/**
*

View File

@ -1,6 +1,6 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.BasicEnum;
import com.agileboot.common.core.enums.BasicEnum;
/**
* @author valarchie

View File

@ -1,8 +1,8 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.dictionary.CssTag;
import com.agileboot.common.enums.dictionary.Dictionary;
import com.agileboot.common.enums.DictionaryEnum;
import com.agileboot.common.core.enums.dictionary.CssTag;
import com.agileboot.common.core.enums.dictionary.Dictionary;
import com.agileboot.common.core.enums.DictionaryEnum;
/**
* 对应sys_notice的 status字段

View File

@ -1,8 +1,8 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.dictionary.CssTag;
import com.agileboot.common.enums.dictionary.Dictionary;
import com.agileboot.common.enums.DictionaryEnum;
import com.agileboot.common.core.enums.dictionary.CssTag;
import com.agileboot.common.core.enums.dictionary.Dictionary;
import com.agileboot.common.core.enums.DictionaryEnum;
/**
* 对应sys_notice的 notice_type字段

View File

@ -1,8 +1,8 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.dictionary.CssTag;
import com.agileboot.common.enums.dictionary.Dictionary;
import com.agileboot.common.enums.DictionaryEnum;
import com.agileboot.common.core.enums.dictionary.CssTag;
import com.agileboot.common.core.enums.dictionary.Dictionary;
import com.agileboot.common.core.enums.DictionaryEnum;
/**
* 对应sys_operation_log的status字段

View File

@ -1,7 +1,7 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.dictionary.Dictionary;
import com.agileboot.common.enums.BasicEnum;
import com.agileboot.common.core.enums.dictionary.Dictionary;
import com.agileboot.common.core.enums.BasicEnum;
/**
* 操作者类型

View File

@ -1,6 +1,6 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.BasicEnum;
import com.agileboot.common.core.enums.BasicEnum;
/**
* Http Method

View File

@ -1,8 +1,8 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.dictionary.CssTag;
import com.agileboot.common.enums.dictionary.Dictionary;
import com.agileboot.common.enums.DictionaryEnum;
import com.agileboot.common.core.enums.dictionary.CssTag;
import com.agileboot.common.core.enums.dictionary.Dictionary;
import com.agileboot.common.core.enums.DictionaryEnum;
/**
* 除非表有特殊指明的话一般用这个枚举代表 status字段

View File

@ -1,8 +1,8 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.dictionary.CssTag;
import com.agileboot.common.enums.dictionary.Dictionary;
import com.agileboot.common.enums.DictionaryEnum;
import com.agileboot.common.core.enums.dictionary.CssTag;
import com.agileboot.common.core.enums.dictionary.Dictionary;
import com.agileboot.common.core.enums.DictionaryEnum;
/**
* 对应sys_user的status字段

View File

@ -1,8 +1,8 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.dictionary.CssTag;
import com.agileboot.common.enums.dictionary.Dictionary;
import com.agileboot.common.enums.DictionaryEnum;
import com.agileboot.common.core.enums.dictionary.CssTag;
import com.agileboot.common.core.enums.dictionary.Dictionary;
import com.agileboot.common.core.enums.DictionaryEnum;
/**
* 对应sys_menu表的is_visible字段

View File

@ -1,8 +1,8 @@
package com.agileboot.common.enums.common;
package com.agileboot.common.core.enums.common;
import com.agileboot.common.enums.DictionaryEnum;
import com.agileboot.common.enums.dictionary.CssTag;
import com.agileboot.common.enums.dictionary.Dictionary;
import com.agileboot.common.core.enums.DictionaryEnum;
import com.agileboot.common.core.enums.dictionary.CssTag;
import com.agileboot.common.core.enums.dictionary.Dictionary;
/**
* 系统内代表是与否的枚举

View File

@ -1,4 +1,4 @@
package com.agileboot.common.enums.dictionary;
package com.agileboot.common.core.enums.dictionary;
/**
* Css 样式

View File

@ -1,4 +1,4 @@
package com.agileboot.common.enums.dictionary;
package com.agileboot.common.core.enums.dictionary;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;

View File

@ -1,6 +1,6 @@
package com.agileboot.common.enums.dictionary;
package com.agileboot.common.core.enums.dictionary;
import com.agileboot.common.enums.DictionaryEnum;
import com.agileboot.common.core.enums.DictionaryEnum;
import lombok.Data;
/**

View File

@ -1,8 +1,8 @@
package com.agileboot.common.exception;
package com.agileboot.common.core.exception;
import cn.hutool.core.util.StrUtil;
import com.agileboot.common.exception.error.ErrorCodeInterface;
import com.agileboot.common.utils.i18n.MessageUtils;
import com.agileboot.common.core.exception.error.ErrorCodeInterface;
import com.agileboot.common.core.utils.i18n.MessageUtils;
import java.util.HashMap;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.exception.error;
package com.agileboot.common.core.exception.error;
import org.springframework.util.Assert;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.exception.error;
package com.agileboot.common.core.exception.error;
/**
* @author valarchie

View File

@ -1,4 +1,4 @@
package com.agileboot.common.utils;
package com.agileboot.common.core.utils;
import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.utils.file;
package com.agileboot.common.core.utils.file;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
@ -7,12 +7,12 @@ import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.URLUtil;
import com.agileboot.common.config.AgileBootConfig;
import com.agileboot.common.constant.Constants;
import com.agileboot.common.exception.ApiException;
import com.agileboot.common.exception.error.ErrorCode;
import com.agileboot.common.exception.error.ErrorCode.Business;
import com.agileboot.common.exception.error.ErrorCode.Internal;
import com.agileboot.common.core.config.AgileBootConfig;
import com.agileboot.common.core.constant.Constants;
import com.agileboot.common.core.exception.ApiException;
import com.agileboot.common.core.exception.error.ErrorCode;
import com.agileboot.common.core.exception.error.ErrorCode.Business;
import com.agileboot.common.core.exception.error.ErrorCode.Internal;
import org.apache.commons.io.FilenameUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MimeType;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.utils.i18n;
package com.agileboot.common.core.utils.i18n;
import cn.hutool.extra.spring.SpringUtil;
import org.springframework.context.MessageSource;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.utils.ip;
package com.agileboot.common.core.utils.ip;
import cn.hutool.core.text.CharSequenceUtil;
import lombok.AllArgsConstructor;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.utils.ip;
package com.agileboot.common.core.utils.ip;
import cn.hutool.core.util.StrUtil;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.utils.ip;
package com.agileboot.common.core.utils.ip;
import cn.hutool.core.lang.Validator;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.utils.ip;
package com.agileboot.common.core.utils.ip;
import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;

View File

@ -1,10 +1,10 @@
package com.agileboot.common.utils.ip;
package com.agileboot.common.core.utils.ip;
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import com.agileboot.common.config.AgileBootConfig;
import com.agileboot.common.utils.jackson.JacksonUtil;
import com.agileboot.common.core.config.AgileBootConfig;
import com.agileboot.common.core.utils.jackson.JacksonUtil;
import lombok.extern.slf4j.Slf4j;
/**

View File

@ -1,4 +1,4 @@
package com.agileboot.common.utils.jackson;
package com.agileboot.common.core.utils.jackson;
/**
* @author valarchie

View File

@ -1,4 +1,4 @@
package com.agileboot.common.utils.jackson;
package com.agileboot.common.core.utils.jackson;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;

View File

@ -1,12 +1,12 @@
package com.agileboot.common.utils.poi;
package com.agileboot.common.core.utils.poi;
import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter;
import com.agileboot.common.annotation.ExcelColumn;
import com.agileboot.common.annotation.ExcelSheet;
import com.agileboot.common.exception.ApiException;
import com.agileboot.common.exception.error.ErrorCode.Internal;
import com.agileboot.common.core.annotation.ExcelColumn;
import com.agileboot.common.core.annotation.ExcelSheet;
import com.agileboot.common.core.exception.ApiException;
import com.agileboot.common.core.exception.error.ErrorCode.Internal;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.multipart.MultipartFile;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.utils.poi;
package com.agileboot.common.core.utils.poi;
import cn.hutool.http.HtmlUtil;
import cn.hutool.poi.excel.cell.CellEditor;

View File

@ -1,4 +1,4 @@
package com.agileboot.common.utils.time;
package com.agileboot.common.core.utils.time;
import cn.hutool.core.date.DateUtil;
import java.util.Date;

407
pom.xml
View File

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.agileboot</groupId>
<artifactId>agileboot</artifactId>
@ -14,43 +14,40 @@
<url>http://www.agileboot.vip</url>
<description>基于 springboot的快速开发系统</description>
<modules>
<!-- <module>agileboot-admin</module>-->
<!-- <module>agileboot-api</module>-->
<module>agileboot-common</module>
<!-- <module>agileboot-domain</module>-->
<!-- <module>agileboot-infrastructure</module>-->
</modules>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<druid.version>1.2.8</druid.version>
<bitwalker.version>1.21</bitwalker.version>
<swagger.version>3.0.0</swagger.version>
<kaptcha.version>2.3.2</kaptcha.version>
<mybatis-spring-boot.version>2.2.2</mybatis-spring-boot.version>
<pagehelper.boot.version>1.4.1</pagehelper.boot.version>
<oshi.version>6.4.0</oshi.version>
<java.version>17</java.version>
<spring.boot.version>3.5.4</spring.boot.version>
<mybatis.version>3.5.16</mybatis.version>
<mybatis-plus.version>3.5.12</mybatis-plus.version>
<springdoc.version>2.8.9</springdoc.version>
<hutool.version>5.8.38</hutool.version>
<lombok.version>1.18.38</lombok.version>
<commons.io.version>2.11.0</commons.io.version>
<commons.fileupload.version>1.4</commons.fileupload.version>
<commons.collections.version>3.2.2</commons.collections.version>
<poi.version>4.1.2</poi.version>
<velocity.version>2.3</velocity.version>
<jwt.version>0.9.1</jwt.version>
<hutool.version>5.7.22</hutool.version>
<lombok.version>1.18.30</lombok.version>
<mybatis-plus.version>3.5.2</mybatis-plus.version>
<mybatis-plus-generator.version>3.5.1</mybatis-plus-generator.version>
<it.ozimov.version>0.7.3</it.ozimov.version>
<io.swagger.version>1.6.8</io.swagger.version>
<org.lionsoul.version>2.6.5</org.lionsoul.version>
<com.google.guava.version>31.0.1-jre</com.google.guava.version>
<springdoc-openapi-ui.version>1.6.14</springdoc-openapi-ui.version>
<mysql-connector-java>8.0.31</mysql-connector-java>
<spring.boot.version>2.7.10</spring.boot.version>
<maven.compiler.plugin.version>3.1</maven.compiler.plugin.version>
<!-- 升级版本以支持junit5 -->
<maven.surefire.plugin.version>3.0.0-M7</maven.surefire.plugin.version>
<maven.war.plugin.version>3.1.0</maven.war.plugin.version>
<!-- JUnit Jupiter 版本 -->
<junit.jupiter.version>5.9.2</junit.jupiter.version>
<!-- Mockito 版本(或直接用 mockito-inline-->
<mockito.version>4.11.0</mockito.version>
<poi.version>4.1.2</poi.version>
<io.swagger.version>1.6.8</io.swagger.version>
<mybatis-plus.version>3.5.2</mybatis-plus.version>
<!-- 插件版本 -->
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
<maven-war-plugin.version>3.4.0</maven-war-plugin.version>
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
<flatten-maven-plugin.version>1.3.0</flatten-maven-plugin.version>
<!-- 打包默认跳过测试 -->
<skipTests>true</skipTests>
</properties>
<!-- 依赖声明 -->
@ -66,26 +63,26 @@
<scope>import</scope>
</dependency>
<!-- 阿里数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<!-- &lt;!&ndash; 阿里数据库连接池 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.alibaba</groupId>-->
<!-- <artifactId>druid-spring-boot-starter</artifactId>-->
<!-- <version>${druid.version}</version>-->
<!-- </dependency>-->
<!-- 解析客户端操作系统、浏览器等 -->
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
<version>${bitwalker.version}</version>
</dependency>
<!-- &lt;!&ndash; 解析客户端操作系统、浏览器等 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>eu.bitwalker</groupId>-->
<!-- <artifactId>UserAgentUtils</artifactId>-->
<!-- <version>${bitwalker.version}</version>-->
<!-- </dependency>-->
<!-- SpringBoot集成mybatis框架 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-spring-boot.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.mybatis.spring.boot</groupId>-->
<!-- <artifactId>mybatis-spring-boot-starter</artifactId>-->
<!-- <version>${mybatis-spring-boot.version}</version>-->
<!-- </dependency>-->
<!-- mybatis plus 主依赖 -->
<dependency>
@ -93,27 +90,27 @@
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<!-- mybatis plus 代码生成器依赖 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>${mybatis-plus-generator.version}</version>
</dependency>
<!-- &lt;!&ndash; mybatis plus 代码生成器依赖 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.baomidou</groupId>-->
<!-- <artifactId>mybatis-plus-generator</artifactId>-->
<!-- <version>${mybatis-plus-generator.version}</version>-->
<!-- </dependency>-->
<!-- pageHelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.boot.version}</version>
</dependency>
<!-- &lt;!&ndash; pageHelper 分页插件 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.github.pagehelper</groupId>-->
<!-- <artifactId>pagehelper-spring-boot-starter</artifactId>-->
<!-- <version>${pagehelper.boot.version}</version>-->
<!-- </dependency>-->
<!-- 获取系统信息 -->
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>${oshi.version}</version>
</dependency>
<!-- &lt;!&ndash; 获取系统信息 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.github.oshi</groupId>-->
<!-- <artifactId>oshi-core</artifactId>-->
<!-- <version>${oshi.version}</version>-->
<!-- </dependency>-->
<!-- io常用工具类 -->
<dependency>
@ -122,12 +119,12 @@
<version>${commons.io.version}</version>
</dependency>
<!-- 文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons.fileupload.version}</version>
</dependency>
<!-- &lt;!&ndash; 文件上传工具类 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>commons-fileupload</groupId>-->
<!-- <artifactId>commons-fileupload</artifactId>-->
<!-- <version>${commons.fileupload.version}</version>-->
<!-- </dependency>-->
<!-- excel工具 -->
<dependency>
@ -136,76 +133,76 @@
<version>${poi.version}</version>
</dependency>
<!-- velocity代码生成使用模板 -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>${velocity.version}</version>
</dependency>
<!-- &lt;!&ndash; velocity代码生成使用模板 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>org.apache.velocity</groupId>-->
<!-- <artifactId>velocity-engine-core</artifactId>-->
<!-- <version>${velocity.version}</version>-->
<!-- </dependency>-->
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector-java}</version>
</dependency>
<!-- &lt;!&ndash; Mysql驱动包 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>mysql</groupId>-->
<!-- <artifactId>mysql-connector-java</artifactId>-->
<!-- <version>${mysql-connector-java}</version>-->
<!-- </dependency>-->
<!-- collections工具类 -->
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>${commons.collections.version}</version>
</dependency>
<!-- &lt;!&ndash; collections工具类 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>commons-collections</groupId>-->
<!-- <artifactId>commons-collections</artifactId>-->
<!-- <version>${commons.collections.version}</version>-->
<!-- </dependency>-->
<!-- Token生成与解析-->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jwt.version}</version>
</dependency>
<!-- &lt;!&ndash; Token生成与解析&ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>io.jsonwebtoken</groupId>-->
<!-- <artifactId>jjwt</artifactId>-->
<!-- <version>${jwt.version}</version>-->
<!-- </dependency>-->
<!-- 验证码 -->
<dependency>
<groupId>com.github.penggle</groupId>
<artifactId>kaptcha</artifactId>
<version>${kaptcha.version}</version>
</dependency>
<!-- &lt;!&ndash; 验证码 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.github.penggle</groupId>-->
<!-- <artifactId>kaptcha</artifactId>-->
<!-- <version>${kaptcha.version}</version>-->
<!-- </dependency>-->
<!-- admin管理模块 -->
<dependency>
<groupId>com.agileboot</groupId>
<artifactId>agileboot-admin</artifactId>
<version>${project.version}</version>
</dependency>
<!-- &lt;!&ndash; admin管理模块 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.agileboot</groupId>-->
<!-- <artifactId>agileboot-admin</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->
<!-- app预留接口-->
<dependency>
<groupId>com.agileboot</groupId>
<artifactId>agileboot-api</artifactId>
<version>${project.version}</version>
</dependency>
<!-- &lt;!&ndash; app预留接口&ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.agileboot</groupId>-->
<!-- <artifactId>agileboot-api</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->
<!-- 核心业务领域-->
<dependency>
<groupId>com.agileboot</groupId>
<artifactId>agileboot-domain</artifactId>
<version>${project.version}</version>
</dependency>
<!-- &lt;!&ndash; 核心业务领域&ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.agileboot</groupId>-->
<!-- <artifactId>agileboot-domain</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->
<!-- 核心模块-->
<dependency>
<groupId>com.agileboot</groupId>
<artifactId>agileboot-infrastructure</artifactId>
<version>${project.version}</version>
</dependency>
<!-- &lt;!&ndash; 核心模块&ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.agileboot</groupId>-->
<!-- <artifactId>agileboot-infrastructure</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->
<!-- 通用工具-->
<dependency>
<groupId>com.agileboot</groupId>
<artifactId>agileboot-common</artifactId>
<version>${project.version}</version>
</dependency>
<!-- &lt;!&ndash; 通用工具&ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.agileboot</groupId>-->
<!-- <artifactId>agileboot-common</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->
<!-- hutool common tools-->
<dependency>
@ -221,42 +218,12 @@
<scope>provided</scope>
</dependency>
<!-- JUnit 5 -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<!-- Mockito -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<!-- 如果有需要 mock final/静态 -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<!-- 获取系统信息 -->
<dependency>
<groupId>it.ozimov</groupId>
<artifactId>embedded-redis</artifactId>
<version>${it.ozimov.version}</version>
</dependency>
<!-- &lt;!&ndash; 获取系统信息 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>it.ozimov</groupId>-->
<!-- <artifactId>embedded-redis</artifactId>-->
<!-- <version>${it.ozimov.version}</version>-->
<!-- </dependency>-->
<!-- 本地ip库 -->
<dependency>
@ -265,25 +232,25 @@
<version>${org.lionsoul.version}</version>
</dependency>
<!-- 引入guava包 -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${com.google.guava.version}</version>
</dependency>
<!-- &lt;!&ndash; 引入guava包 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.google.guava</groupId>-->
<!-- <artifactId>guava</artifactId>-->
<!-- <version>${com.google.guava.version}</version>-->
<!-- </dependency>-->
<!-- 多数据源 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<!-- &lt;!&ndash; 多数据源 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.baomidou</groupId>-->
<!-- <artifactId>dynamic-datasource-spring-boot-starter</artifactId>-->
<!-- <version>${mybatis-plus.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>${springdoc-openapi-ui.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springdoc</groupId>-->
<!-- <artifactId>springdoc-openapi-starter-webmvc-api</artifactId>-->
<!-- <version>${springdoc.version}</version>-->
<!-- </dependency>-->
<!-- swagger注解 -->
<dependency>
@ -295,15 +262,6 @@
</dependencies>
</dependencyManagement>
<modules>
<module>agileboot-admin</module>
<module>agileboot-api</module>
<module>agileboot-common</module>
<module>agileboot-domain</module>
<module>agileboot-infrastructure</module>
</modules>
<packaging>pom</packaging>
<dependencies>
<dependency>
@ -314,11 +272,6 @@
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
@ -338,7 +291,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
@ -348,7 +301,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<version>${maven-surefire-plugin.version}</version>
<!-- 想跑test的话 设置成false -->
<configuration>
<skipTests>true</skipTests>
@ -357,7 +310,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${maven.war.plugin.version}</version>
<version>${maven-war-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
@ -379,29 +332,29 @@
</plugins>
</build>
<!-- <repositories>-->
<!-- <repository>-->
<!-- <id>public</id>-->
<!-- <name>aliyun nexus</name>-->
<!-- <url>https://maven.aliyun.com/repository/public</url>-->
<!-- <releases>-->
<!-- <enabled>true</enabled>-->
<!-- </releases>-->
<!-- </repository>-->
<!-- </repositories>-->
<!-- <repositories>-->
<!-- <repository>-->
<!-- <id>public</id>-->
<!-- <name>aliyun nexus</name>-->
<!-- <url>https://maven.aliyun.com/repository/public</url>-->
<!-- <releases>-->
<!-- <enabled>true</enabled>-->
<!-- </releases>-->
<!-- </repository>-->
<!-- </repositories>-->
<!-- <pluginRepositories>-->
<!-- <pluginRepository>-->
<!-- <id>public</id>-->
<!-- <name>aliyun nexus</name>-->
<!-- <url>https://maven.aliyun.com/repository/public</url>-->
<!-- <releases>-->
<!-- <enabled>true</enabled>-->
<!-- </releases>-->
<!-- <snapshots>-->
<!-- <enabled>false</enabled>-->
<!-- </snapshots>-->
<!-- </pluginRepository>-->
<!-- </pluginRepositories>-->
<!-- <pluginRepositories>-->
<!-- <pluginRepository>-->
<!-- <id>public</id>-->
<!-- <name>aliyun nexus</name>-->
<!-- <url>https://maven.aliyun.com/repository/public</url>-->
<!-- <releases>-->
<!-- <enabled>true</enabled>-->
<!-- </releases>-->
<!-- <snapshots>-->
<!-- <enabled>false</enabled>-->
<!-- </snapshots>-->
<!-- </pluginRepository>-->
<!-- </pluginRepositories>-->
</project>