Compare commits

..

25 Commits

Author SHA1 Message Date
69dbd0703c release: v2.13.0 2025-07-05 18:22:43 +08:00
a0ace7d60c build: groupId top.continew => top.continew.starter 2025-07-05 17:29:58 +08:00
0729be287c revert(extension/crud): 还原 CrudRequestMapping 的 ignoreAuth、ignorePermission 支持(方案不优雅) 2025-07-05 16:36:53 +08:00
e1c9a91c77 refactor(data/mp): 将 MP 的 CrudRepository 迁移至 ServiceImpl 类中,减少两层继承,解决层级过多出现 Sonar 警告的问题 2025-07-05 16:09:15 +08:00
68f1f41cc9 fix(validation): 修复引入包错误,spel-validator-javax => spel-validator-jakarta 2025-07-05 10:16:02 +08:00
cce1b5560b feat(extension/crud): CrudService 增加 Valid 校验注解,Controller 层使用 Valid 替换部分 Validated 注解
在 Service 层实现类添加 Validated 注解即可开启 Service 层校验
2025-07-04 21:24:29 +08:00
223236aad3 chore: 简化 package,对于互斥包不再单独命名,例如:data.mp、data.mf,统一为 data 2025-07-04 21:15:28 +08:00
78a7904c2f chore(core): 调整 CheckUtils 等校验类到 util.validation 包下 2025-07-04 21:06:28 +08:00
54ef6c6652 feat(crud): CrudRequestMapping 注解增加 ignoreAuth、ignorePermission 支持 2025-07-03 22:03:32 +08:00
27dc2294e6 refactor(core): ProjectProperties => ApplicationProperties 2025-07-03 20:42:04 +08:00
f84a1dddfd build(dependencies): commons-beanutils 1.9.4 => 1.11.0 2025-06-26 21:23:32 +08:00
jiang4yu
8d5d97dcf6 fix(validation): 修复PhoneValidator中校验绑定错误 2025-06-19 02:16:54 +00:00
fa7af8e7b7 feat(validation): 新增 Phone 手机号校验注解,支持校验座机号码、手机号码(中国大陆)、手机号码(中国香港)、手机号码(中国台湾)、手机号码(中国澳门)
区别于 Mobile 手机号校验注解(只校验中国大陆手机号码)

Closes #70
2025-06-18 20:27:42 +08:00
5ae5b2602a feat(validation): 新增校验模块并引入 SpEL Validator 用于复杂校验场景 2025-06-18 20:19:36 +08:00
5a53d953da refactor(excel): file => excel 2025-06-17 21:19:57 +08:00
8806eb9942 fix(data): 修复 MyBatis Plus 依赖升级遗漏错误
mybatis-plus-extension => mybatis-plus-jsqlparser
2025-06-17 21:17:23 +08:00
jiang4yu
df9255ca3d fix(json/jackson): 补充相关类的导入 2025-06-17 03:35:37 +00:00
jiang4yu
ffa484d945 feat(json/jackson): 添加对Instant、Duration的序列化和反序列化处理 2025-06-17 03:10:39 +00:00
bc53d5bfff feat(extension/crud): 新增 Api.BATCH_DELETE 批量删除枚举,拆分单个删除和批量删除接口 2025-06-16 22:29:00 +08:00
a7d1e71ab3 refactor(extension/crud): AbstractBaseController => AbstractCrudController,BaseService => CrudService 2025-06-15 22:36:48 +08:00
1d47cc6f9c build(dependencies): 更新项目依赖版本
- spring-boot 3.3.11 => 3.3.12
- redisson 3.46.0 => 3.49.0
- cosid 2.12.3 => 2.13.0
- sa-token 1.42.0 => 1.44.0
- mybatis-plus 3.5.8 => 3.5.12
- mybatis-flex 1.10.8 => 1.10.9
- snail-job 1.4.0 => 1.5.0
- sms4j 3.3.4 => 3.3.5
- aws-sdk 2.31.35 => 2.31.63
- aws-crt 0.36.1 => 0.38.1
- hutool 5.8.37 => 5.8.38
2025-06-15 22:30:24 +08:00
08abe94c85 feat(api-doc): ApiDocUtils 新增 buildGroupedOpenApi(构建分组接口文档) 方法
DocUtils => ApiDocUtils
2025-06-14 22:16:31 +08:00
079adb8b2c build: 更新项目版本号至2.13.0-SNAPSHOT 2025-06-14 22:15:10 +08:00
e6ab8cd198 Merge branch '2.12.x' into dev 2025-06-13 23:42:41 +08:00
jiang4yu
c843434720 feat(file/poi): 新增 continew-starter-file-poi 模块(添加 ExcelImport 与 ExcelExport 注解)
1.将EasyExcel升级为FastExcel
2.新增 continew-starter-file-poi 模块(添加 ExcelImport 与 ExcelExport 注解,https://zyqok.blog.csdn.net/article/details/121994504)
2025-06-10 03:48:26 +00:00
166 changed files with 2448 additions and 597 deletions

View File

@@ -1,3 +1,40 @@
## [v2.13.0](https://github.com/continew-org/continew-starter/compare/v2.12.2...v2.13.0) (2025-07-05)
### ✨ 新特性
- 【excel/poi】新增 continew-starter-excel-poi 模块,并使用 FastExcel 替换 EasyExcel (Gitee#64@jiang4yu)
- 【api-doc】ApiDocUtils 新增 buildGroupedOpenApi构建分组接口文档 方法 ([08abe94](https://github.com/continew-org/continew-starter/commit/08abe94c85f098c3a797fa5b3255136654dc2720))
- 【extension/crud】新增 Api.BATCH_DELETE 批量删除枚举,拆分单个删除和批量删除接口 ([bc53d5b](https://github.com/continew-org/continew-starter/commit/bc53d5bfffda10ace055817f0249995296675ac1))
- 【json/jackson】添加对Instant、Duration的序列化和反序列化处理 (Gitee#68@jiang4yu) ([ffa484d](https://github.com/continew-org/continew-starter/commit/ffa484d9452c176489b77d1bea892b33d35a7019)) ([df9255c](https://github.com/continew-org/continew-starter/commit/df9255ca3de2452f0de68e4ae35282a1a7727b65))
- 【validation】新增校验模块并引入 SpEL Validator 用于复杂校验场景 ([5ae5b26](https://github.com/continew-org/continew-starter/commit/5ae5b2602aaa8e08c03fa8881c8109b0a1831966)) ([68f1f41](https://github.com/continew-org/continew-starter/commit/68f1f41cc991e81179f475111403d8917b17c55f))
- 【validation】新增 Phone 手机号校验注解,支持校验座机号码、手机号码(中国大陆)、手机号码(中国香港)、手机号码(中国台湾)、手机号码(中国澳门) ([fa7af8e](https://github.com/continew-org/continew-starter/commit/fa7af8e7b7eed91d2917688817885349a2965f16)) ([8d5d97d](https://github.com/continew-org/continew-starter/commit/8d5d97dcf6c102217aa9a8b745f891b388da8a10))
- 【extension/crud】CrudService 增加 Valid 校验注解Controller 层使用 Valid 替换部分 Validated 注解 ([cce1b55](https://github.com/continew-org/continew-starter/commit/cce1b5560b3f468998d38609fc30a01ebcb9aa20))
### 💎 功能优化
- 【extension/crud】AbstractBaseController => AbstractCrudControllerBaseService => CrudService ([a7d1e71](https://github.com/continew-org/continew-starter/commit/a7d1e71ab39652a93653e127bfe4a1c167342743))
- 【excel】file 模块重命名为 excel ([5a53d95](https://github.com/continew-org/continew-starter/commit/5a53d953da8d0bb158bd94820a45c7b26887328f))
- 【core】ProjectProperties => ApplicationProperties ([27dc229](https://github.com/continew-org/continew-starter/commit/27dc2294e6a90c2a6b0e95b58e816ab6cb5cce26))
- 【core】调整 CheckUtils 等校验类到 util.validation 包下 ([78a7904](https://github.com/continew-org/continew-starter/commit/78a7904c2fba7c18869afb3f089b23b79666a3a7))
- 简化 package对于互斥包不再单独命名例如data.mp、data.mf统一为 data ([223236a](https://github.com/continew-org/continew-starter/commit/223236aad31c32a8e2c49802dbd1f2f34a3ca275))
- 【data/mp】将 MP 的 CrudRepository 迁移至 ServiceImpl 类中,减少两层继承,解决层级过多出现 Sonar 警告的问题 ([e1c9a91](https://github.com/continew-org/continew-starter/commit/e1c9a91c77127a1f2a87f6c2effa813a82fc1877))
### 📦 依赖升级
- 调整 groupId top.continew => top.continew.starter ([a0ace7d](https://github.com/continew-org/continew-starter/commit/a0ace7d60c06b38a2535a5f48e3dbd1f87e9faa7))
- commons-beanutils 1.9.4 => 1.11.0 ([f84a1dd](https://github.com/continew-org/continew-starter/commit/f84a1dddfd27e6d4c1ddd3469866e01f6ddd2931))
- spring-boot 3.3.11 => 3.3.12 ([1d47cc6](https://github.com/continew-org/continew-starter/commit/1d47cc6f9ccf9c0ed6e02744e56063876f9a1200))
- redisson 3.46.0 => 3.49.0
- cosid 2.12.3 => 2.13.0
- sa-token 1.42.0 => 1.44.0
- mybatis-plus 3.5.8 => 3.5.12 ([1d47cc6](https://github.com/continew-org/continew-starter/commit/1d47cc6f9ccf9c0ed6e02744e56063876f9a1200)) ([8806eb9](https://github.com/continew-org/continew-starter/commit/8806eb9942df210788510489e24cc5636b0fb77a))
- mybatis-flex 1.10.8 => 1.10.9
- snail-job 1.4.0 => 1.5.0
- sms4j 3.3.4 => 3.3.5
- aws-sdk 2.31.35 => 2.31.63
- aws-crt 0.36.1 => 0.38.1
- hutool 5.8.37 => 5.8.38
## [v2.12.2](https://github.com/continew-org/continew-starter/compare/v2.12.1...v2.12.2) (2025-06-13)
### 🐛 问题修复

View File

@@ -4,7 +4,7 @@
<img src="https://img.shields.io/maven-central/v/top.continew/continew-starter.svg?label=Maven%20Central&logo=sonatype&logoColor=FFF" alt="Release" />
</a>
<a href="https://spring.io/projects/spring-boot" title="Spring Boot" target="_blank">
<img src="https://img.shields.io/badge/Spring Boot-3.3.9-%236CB52D.svg?logo=Spring-Boot" alt="Spring Boot" />
<img src="https://img.shields.io/badge/Spring Boot-3.3.12-%236CB52D.svg?logo=Spring-Boot" alt="Spring Boot" />
</a>
<a href="https://github.com/continew-org/continew-starter" title="Open JDK" target="_blank">
<img src="https://img.shields.io/badge/Open JDK-17-%236CB52D.svg?logo=OpenJDK&logoColor=FFF" alt="Open JDK" />
@@ -83,7 +83,7 @@ ContiNew Starter 就是将脚手架项目中的通用基础配置进行了封装
```xml
<parent>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter</artifactId>
<version>{latest-version}</version>
</parent>
@@ -103,7 +103,7 @@ ContiNew Starter 就是将脚手架项目中的通用基础配置进行了封装
<dependencies>
<!-- ContiNew Starter Dependencies -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-dependencies</artifactId>
<version>{latest-version}</version>
<type>pom</type>
@@ -119,7 +119,7 @@ ContiNew Starter 就是将脚手架项目中的通用基础配置进行了封装
<dependencies>
<!-- Web 模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-web</artifactId>
</dependency>
</dependencies>
@@ -152,6 +152,7 @@ continew-starter
├─ continew-starter-jsonJSON 模块)
│ └─ continew-starter-json-jackson
├─ continew-starter-api-doc接口文档模块Spring Doc + Knife4j
├─ continew-starter-validation校验模块Hibernate Validator
├─ continew-starter-webWeb 开发模块:包含跨域、全局异常+响应、链路追踪等自动配置)
├─ continew-starter-cache缓存模块
│ ├─ continew-starter-cache-redissonRedisson
@@ -161,7 +162,7 @@ continew-starter
│ ├─ continew-starter-auth-satoken国产轻量认证鉴权
│ └─ continew-starter-auth-justauth第三方登录
├─ continew-starter-data数据访问模块
│ ├─ continew-starter-data-core通用模块)
│ ├─ continew-starter-data-core核心模块)
│ ├─ continew-starter-data-mpMyBatis Plus
│ └─ continew-starter-data-mfMyBatis Flex
├─ continew-starter-security安全模块
@@ -179,11 +180,13 @@ continew-starter
│ ├─ continew-starter-messaging-mail邮件
│ └─ continew-starter-messaging-websocketWebSocket
├─ continew-starter-log日志模块
│ ├─ continew-starter-log-core通用模块)
│ ├─ continew-starter-log-core核心模块)
│ ├─ continew-starter-log-aop基于 AOP 实现)
│ └─ continew-starter-log-interceptor基于拦截器实现Spring Boot Actuator HttpTrace 增强版))
├─ continew-starter-file文件处理模块)
─ continew-starter-file-excelEasy Excel
├─ continew-starter-excelExcel 文件处理模块)
─ continew-starter-excel-core核心模块
│ ├─ continew-starter-excel-fastexcelFastExcel
│ └─ continew-starter-excel-poiPOI
├─ continew-starter-storage存储模块
│ └─ continew-starter-storage-local本地存储
├─ continew-starter-licenseLicense 模块)
@@ -192,13 +195,13 @@ continew-starter
│ └─ continew-starter-license-verifierLicense 校验器)
└─ continew-starter-extension扩展模块
├─ continew-starter-extension-datapermission数据权限模块
│ ├─ continew-starter-extension-datapermission-core通用模块)
│ ├─ continew-starter-extension-datapermission-core核心模块)
│ └─ continew-starter-extension-datapermission-mpMyBatis Plus
├─ continew-starter-extension-tenant多租户模块
│ ├─ continew-starter-extension-tenant-core通用模块)
│ ├─ continew-starter-extension-tenant-core核心模块)
│ └─ continew-starter-extension-tenant-mpMyBatis Plus
└─ continew-starter-extension-crudCRUD 模块)
├─ continew-starter-extension-crud-core通用模块)
├─ continew-starter-extension-crud-core核心模块)
├─ continew-starter-extension-crud-mpMyBatis Plus
└─ continew-starter-extension-crud-mfMyBatis Flex
```

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter</artifactId>
<version>${revision}</version>
</parent>
@@ -18,7 +18,7 @@
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-core</artifactId>
</dependency>

View File

@@ -47,7 +47,7 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import top.continew.starter.apidoc.handler.BaseEnumParameterHandler;
import top.continew.starter.apidoc.handler.OpenApiHandler;
import top.continew.starter.core.autoconfigure.project.ProjectProperties;
import top.continew.starter.core.autoconfigure.application.ApplicationProperties;
import top.continew.starter.core.util.GeneralPropertySourceFactory;
import java.util.List;
@@ -83,15 +83,15 @@ public class SpringDocAutoConfiguration implements WebMvcConfigurer {
*/
@Bean
@ConditionalOnMissingBean
public OpenAPI openApi(ProjectProperties projectProperties, SpringDocExtensionProperties properties) {
Info info = new Info().title("%s %s".formatted(projectProperties.getName(), "API 文档"))
.version(projectProperties.getVersion())
.description(projectProperties.getDescription());
ProjectProperties.Contact contact = projectProperties.getContact();
public OpenAPI openApi(ApplicationProperties applicationProperties, SpringDocExtensionProperties properties) {
Info info = new Info().title("%s %s".formatted(applicationProperties.getName(), "API 文档"))
.version(applicationProperties.getVersion())
.description(applicationProperties.getDescription());
ApplicationProperties.Contact contact = applicationProperties.getContact();
if (contact != null) {
info.contact(new Contact().name(contact.getName()).email(contact.getEmail()).url(contact.getUrl()));
}
ProjectProperties.License license = projectProperties.getLicense();
ApplicationProperties.License license = applicationProperties.getLicense();
if (license != null) {
info.license(new License().name(license.getName()).url(license.getUrl()));
}

View File

@@ -26,7 +26,7 @@ import io.swagger.v3.oas.models.parameters.Parameter;
import org.springdoc.core.customizers.ParameterCustomizer;
import org.springdoc.core.customizers.PropertyCustomizer;
import org.springframework.core.MethodParameter;
import top.continew.starter.apidoc.util.DocUtils;
import top.continew.starter.apidoc.util.ApiDocUtils;
import top.continew.starter.core.enums.BaseEnum;
import java.lang.reflect.Type;
@@ -84,9 +84,9 @@ public class BaseEnumParameterHandler implements ParameterCustomizer, PropertyCu
BaseEnum[] enums = (BaseEnum[])enumClass.getEnumConstants();
List<String> valueList = Arrays.stream(enums).map(e -> e.getValue().toString()).toList();
schema.setEnum(valueList);
String enumValueType = DocUtils.getEnumValueTypeAsString(enumClass);
String enumValueType = ApiDocUtils.getEnumValueTypeAsString(enumClass);
schema.setType(enumValueType);
schema.setFormat(DocUtils.resolveFormat(enumValueType));
schema.setFormat(ApiDocUtils.resolveFormat(enumValueType));
}
/**
@@ -97,7 +97,7 @@ public class BaseEnumParameterHandler implements ParameterCustomizer, PropertyCu
* @return 追加后的描述字符串
*/
private String appendEnumDescription(String originalDescription, Class<?> enumClass) {
return originalDescription + "<span style='color:red'>" + DocUtils.getDescMap(enumClass) + "</span>";
return originalDescription + "<span style='color:red'>" + ApiDocUtils.getDescMap(enumClass) + "</span>";
}
/**

View File

@@ -16,6 +16,7 @@
package top.continew.starter.apidoc.util;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.web.bind.annotation.RestController;
import top.continew.starter.core.enums.BaseEnum;
@@ -30,11 +31,37 @@ import java.util.stream.Collectors;
* 接口文档工具类
*
* @author echo
* @author Charles7c
* @since 2.5.2
*/
public class DocUtils {
public class ApiDocUtils {
private DocUtils() {
private ApiDocUtils() {
}
/**
* 构建分组接口文档
*
* @param group 分组名称
* @param pathsToMatch 路径匹配
* @return GroupedOpenApi
* @since 2.13.0
*/
public static GroupedOpenApi buildGroupedOpenApi(String group, String... pathsToMatch) {
return buildGroupedOpenApi(group, group, pathsToMatch);
}
/**
* 构建分组接口文档
*
* @param group 分组名称
* @param displayName 分组显示名称
* @param pathsToMatch 路径匹配
* @return GroupedOpenApi
* @since 2.13.0
*/
public static GroupedOpenApi buildGroupedOpenApi(String group, String displayName, String... pathsToMatch) {
return GroupedOpenApi.builder().group(group).displayName(displayName).pathsToMatch(pathsToMatch).build();
}
/**

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-auth</artifactId>
<version>${revision}</version>
</parent>
@@ -18,7 +18,7 @@
<dependencies>
<!-- 缓存模块 - Redisson -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-cache-redisson</artifactId>
<optional>true</optional>
</dependency>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-auth</artifactId>
<version>${revision}</version>
</parent>
@@ -18,7 +18,7 @@
<dependencies>
<!-- 缓存模块 - Redisson -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-cache-redisson</artifactId>
<optional>true</optional>
</dependency>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter</artifactId>
<version>${revision}</version>
</parent>
@@ -23,7 +23,7 @@
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-core</artifactId>
</dependency>
</dependencies>

View File

@@ -4,7 +4,7 @@
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>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-bom</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
@@ -13,276 +13,294 @@
<description>ContiNew Starter BOM</description>
<properties>
<revision>2.12.2</revision>
<revision>2.13.0</revision>
</properties>
<dependencyManagement>
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-core</artifactId>
<version>${revision}</version>
</dependency>
<!-- JSON 模块 - Jackson -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-json-jackson</artifactId>
<version>${revision}</version>
</dependency>
<!-- API 文档模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-api-doc</artifactId>
<version>${revision}</version>
</dependency>
<!-- 校验模块 -->
<dependency>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-validation</artifactId>
<version>${revision}</version>
</dependency>
<!-- Web 模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-web</artifactId>
<version>${revision}</version>
</dependency>
<!-- 缓存模块 - Redisson -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-cache-redisson</artifactId>
<version>${revision}</version>
</dependency>
<!-- 缓存模块 - Spring Cache -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-cache-springcache</artifactId>
<version>${revision}</version>
</dependency>
<!-- 缓存模块 - JetCache -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-cache-jetcache</artifactId>
<version>${revision}</version>
</dependency>
<!-- 认证模块 - SaToken -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-auth-satoken</artifactId>
<version>${revision}</version>
</dependency>
<!-- 认证模块 - JustAuth -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-auth-justauth</artifactId>
<version>${revision}</version>
</dependency>
<!-- 数据访问模块 - MyBatis Plus -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-data-mp</artifactId>
<version>${revision}</version>
</dependency>
<!-- 数据访问模块 - MyBatis Flex -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-data-mf</artifactId>
<version>${revision}</version>
</dependency>
<!-- 数据访问模块 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-data-core</artifactId>
<version>${revision}</version>
</dependency>
<!-- 安全模块 - 密码编码器 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-security-password</artifactId>
<version>${revision}</version>
</dependency>
<!-- 安全模块 - 加密 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-security-crypto</artifactId>
<version>${revision}</version>
</dependency>
<!-- 安全模块 - 脱敏 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-security-mask</artifactId>
<version>${revision}</version>
</dependency>
<!-- 安全模块 - XSS 过滤 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-security-xss</artifactId>
<version>${revision}</version>
</dependency>
<!-- 安全模块 - 敏感词 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-security-sensitivewords</artifactId>
<version>${revision}</version>
</dependency>
<!-- 限流模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-ratelimiter</artifactId>
<version>${revision}</version>
</dependency>
<!-- 幂等模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-idempotent</artifactId>
<version>${revision}</version>
</dependency>
<!-- 链路追踪模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-trace</artifactId>
<version>${revision}</version>
</dependency>
<!-- 验证码模块 - 图形验证码 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-captcha-graphic</artifactId>
<version>${revision}</version>
</dependency>
<!-- 验证码模块 - 行为验证码 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-captcha-behavior</artifactId>
<version>${revision}</version>
</dependency>
<!-- 消息模块 - 邮件 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-messaging-mail</artifactId>
<version>${revision}</version>
</dependency>
<!-- 消息模块 - WebSocket -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-messaging-websocket</artifactId>
<version>${revision}</version>
</dependency>
<!-- 日志模块 - 基于拦截器实现Spring Boot Actuator HttpTrace 增强版) -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-log-interceptor</artifactId>
<version>${revision}</version>
</dependency>
<!-- 日志模块 - 基于 AOP 实现 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-log-aop</artifactId>
<version>${revision}</version>
</dependency>
<!-- 日志模块 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-log-core</artifactId>
<version>${revision}</version>
</dependency>
<!-- 文件处理模块 - Excel -->
<!-- Excel 文件处理模块 - FastExcel -->
<dependency>
<groupId>top.continew</groupId>
<artifactId>continew-starter-file-excel</artifactId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-excel-fastexcel</artifactId>
<version>${revision}</version>
</dependency>
<!-- Excel 文件处理模块 - POI -->
<dependency>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-excel-poi</artifactId>
<version>${revision}</version>
</dependency>
<!-- Excel 文件处理模块 - 核心模块 -->
<dependency>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-excel-core</artifactId>
<version>${revision}</version>
</dependency>
<!-- 存储模块 - 本地存储 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-storage-local</artifactId>
<version>${revision}</version>
</dependency>
<!-- 存储模块 - 对象存储 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-storage-oss</artifactId>
<version>${revision}</version>
</dependency>
<!-- 存储模块 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-storage-core</artifactId>
<version>${revision}</version>
</dependency>
<!-- License 模块 - 生成器 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-license-generator</artifactId>
<version>${revision}</version>
</dependency>
<!-- License 模块 - 校验器 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-license-verifier</artifactId>
<version>${revision}</version>
</dependency>
<!-- License 模块 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-license-core</artifactId>
<version>${revision}</version>
</dependency>
<!-- 扩展模块 - CRUD - MyBatis Plus ORM 模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-crud-mp</artifactId>
<version>${revision}</version>
</dependency>
<!-- 扩展模块 - CRUD - MyBatis Flex ORM 模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-crud-mf</artifactId>
<version>${revision}</version>
</dependency>
<!-- 扩展模块 - CRUD - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-crud-core</artifactId>
<version>${revision}</version>
</dependency>
<!-- 扩展模块 - 数据权限 - MyBatis Plus ORM 模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-datapermission-mp</artifactId>
<version>${revision}</version>
</dependency>
<!-- 扩展模块 - 数据权限 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-datapermission-core</artifactId>
<version>${revision}</version>
</dependency>
<!-- 扩展模块 - 多租户 - MyBatis Plus ORM 模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-tenant-mp</artifactId>
<version>${revision}</version>
</dependency>
<!-- 扩展模块 - 多租户 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-tenant-core</artifactId>
<version>${revision}</version>
</dependency>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-cache</artifactId>
<version>${revision}</version>
</parent>
@@ -18,7 +18,7 @@
<dependencies>
<!-- 缓存模块 - Redisson -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-cache-redisson</artifactId>
</dependency>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-cache</artifactId>
<version>${revision}</version>
</parent>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-cache</artifactId>
<version>${revision}</version>
</parent>
@@ -18,7 +18,7 @@
<dependencies>
<!-- 缓存模块 - Redisson -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-cache-redisson</artifactId>
</dependency>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter</artifactId>
<version>${revision}</version>
</parent>
@@ -24,7 +24,7 @@
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-core</artifactId>
</dependency>
</dependencies>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-captcha</artifactId>
<version>${revision}</version>
</parent>
@@ -18,7 +18,7 @@
<dependencies>
<!-- 缓存模块 - Redisson -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-cache-redisson</artifactId>
</dependency>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-captcha</artifactId>
<version>${revision}</version>
</parent>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter</artifactId>
<version>${revision}</version>
</parent>
@@ -23,7 +23,7 @@
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-core</artifactId>
</dependency>
</dependencies>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter</artifactId>
<version>${revision}</version>
</parent>

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.core.autoconfigure.project;
package top.continew.starter.core.autoconfigure.application;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
@@ -22,7 +22,7 @@ import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
/**
* 项目自动配置
* 应用自动配置
*
* @author Charles7c
* @since 1.0.0
@@ -30,5 +30,5 @@ import org.springframework.context.annotation.Import;
@AutoConfiguration
@ComponentScan("cn.hutool.extra.spring")
@Import(cn.hutool.extra.spring.SpringUtil.class)
@EnableConfigurationProperties(ProjectProperties.class)
public class ProjectAutoConfiguration {}
@EnableConfigurationProperties(ApplicationProperties.class)
public class ApplicationAutoConfiguration {}

View File

@@ -14,18 +14,23 @@
* limitations under the License.
*/
package top.continew.starter.core.autoconfigure.project;
package top.continew.starter.core.autoconfigure.application;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* 项目配置属性
* 应用配置属性
*
* @author Charles7c
* @since 1.0.0
*/
@ConfigurationProperties("project")
public class ProjectProperties {
@ConfigurationProperties("application")
public class ApplicationProperties {
/**
* ID
*/
private String id;
/**
* 名称
@@ -33,20 +38,15 @@ public class ProjectProperties {
private String name;
/**
* 应用名称
* 描述
*/
private String appName;
private String description;
/**
* 版本
*/
private String version;
/**
* 描述
*/
private String description;
/**
* URL
*/
@@ -147,6 +147,14 @@ public class ProjectProperties {
}
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
@@ -155,12 +163,12 @@ public class ProjectProperties {
this.name = name;
}
public String getAppName() {
return appName;
public String getDescription() {
return description;
}
public void setAppName(String appName) {
this.appName = appName;
public void setDescription(String description) {
this.description = description;
}
public String getVersion() {
@@ -171,14 +179,6 @@ public class ProjectProperties {
this.version = version;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getUrl() {
return url;
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.core.validation;
package top.continew.starter.core.util.validation;
import cn.hutool.core.text.CharSequenceUtil;
import top.continew.starter.core.constant.StringConstants;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.core.validation;
package top.continew.starter.core.util.validation;
import cn.hutool.core.text.CharSequenceUtil;
import top.continew.starter.core.exception.BadRequestException;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.core.validation;
package top.continew.starter.core.util.validation;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.ObjectUtil;

View File

@@ -1,4 +1,3 @@
top.continew.starter.core.autoconfigure.project.ProjectAutoConfiguration
top.continew.starter.core.autoconfigure.ValidatorAutoConfiguration
top.continew.starter.core.autoconfigure.application.ApplicationAutoConfiguration
top.continew.starter.core.autoconfigure.threadpool.ThreadPoolAutoConfiguration
top.continew.starter.core.autoconfigure.threadpool.AsyncAutoConfiguration

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-data</artifactId>
<version>${revision}</version>
</parent>

View File

@@ -14,9 +14,9 @@
* limitations under the License.
*/
package top.continew.starter.data.core.annotation;
package top.continew.starter.data.annotation;
import top.continew.starter.data.core.enums.QueryType;
import top.continew.starter.data.enums.QueryType;
import java.lang.annotation.*;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.core.annotation;
package top.continew.starter.data.annotation;
import java.lang.annotation.*;

View File

@@ -14,9 +14,9 @@
* limitations under the License.
*/
package top.continew.starter.data.core.enums;
package top.continew.starter.data.enums;
import top.continew.starter.data.core.function.ISqlFunction;
import top.continew.starter.data.function.ISqlFunction;
import java.io.Serializable;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.core.enums;
package top.continew.starter.data.enums;
/**
* 查询类型枚举

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.core.function;
package top.continew.starter.data.function;
import java.io.Serializable;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.core.util;
package top.continew.starter.data.util;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
@@ -25,7 +25,7 @@ import cn.hutool.db.meta.MetaUtil;
import cn.hutool.db.meta.Table;
import cn.hutool.db.meta.TableType;
import top.continew.starter.core.exception.BusinessException;
import top.continew.starter.data.core.enums.DatabaseType;
import top.continew.starter.data.enums.DatabaseType;
import javax.sql.DataSource;
import java.sql.Connection;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.core.util;
package top.continew.starter.data.util;
import cn.hutool.core.text.CharSequenceUtil;
import org.slf4j.Logger;

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-data</artifactId>
<version>${revision}</version>
</parent>
@@ -18,7 +18,7 @@
<dependencies>
<!-- 数据访问模块 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-data-core</artifactId>
</dependency>

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.autoconfigure;
package top.continew.starter.data.autoconfigure;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import top.continew.starter.core.constant.PropertiesConstants;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.autoconfigure;
package top.continew.starter.data.autoconfigure;
import com.mybatisflex.core.dialect.DbType;
import org.springframework.boot.context.properties.ConfigurationProperties;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.autoconfigure;
package top.continew.starter.data.autoconfigure;
import com.mybatisflex.core.dialect.DbType;
import com.mybatisflex.core.dialect.DialectFactory;
@@ -30,8 +30,8 @@ import org.springframework.context.annotation.PropertySource;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import top.continew.starter.core.constant.PropertiesConstants;
import top.continew.starter.core.util.GeneralPropertySourceFactory;
import top.continew.starter.data.mf.datapermission.DataPermissionDialect;
import top.continew.starter.data.mf.datapermission.DataPermissionFilter;
import top.continew.starter.data.datapermission.DataPermissionDialect;
import top.continew.starter.data.datapermission.DataPermissionFilter;
/**
* MyBatis Flex 自动配置

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.base;
package top.continew.starter.data.base;
import cn.hutool.core.util.ClassUtil;
import com.mybatisflex.core.query.QueryWrapper;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.base;
package top.continew.starter.data.base;
import java.io.Serializable;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.datapermission;
package top.continew.starter.data.datapermission;
import java.lang.annotation.*;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.datapermission;
package top.continew.starter.data.datapermission;
import org.aspectj.lang.annotation.*;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.datapermission;
package top.continew.starter.data.datapermission;
import java.util.Set;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.datapermission;
package top.continew.starter.data.datapermission;
import cn.hutool.core.text.CharSequenceUtil;
import com.mybatisflex.core.dialect.impl.CommonsDialectImpl;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.datapermission;
package top.continew.starter.data.datapermission;
/**
* 数据权限过滤器接口

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.datapermission;
package top.continew.starter.data.datapermission;
/**
* 数据权限枚举

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.service;
package top.continew.starter.data.service;
/**
* 通用业务接口

View File

@@ -14,11 +14,11 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.service.impl;
package top.continew.starter.data.service.impl;
import top.continew.starter.core.util.ClassUtils;
import top.continew.starter.data.mf.base.BaseMapper;
import top.continew.starter.data.mf.service.IService;
import top.continew.starter.data.base.BaseMapper;
import top.continew.starter.data.service.IService;
/**
* 通用业务实现类

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mf.util;
package top.continew.starter.data.util;
import cn.hutool.core.annotation.AnnotationUtil;
import cn.hutool.core.collection.CollUtil;
@@ -28,11 +28,10 @@ import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Sort;
import top.continew.starter.core.exception.BadRequestException;
import top.continew.starter.core.util.ReflectUtils;
import top.continew.starter.core.validation.ValidationUtils;
import top.continew.starter.data.core.annotation.Query;
import top.continew.starter.data.core.annotation.QueryIgnore;
import top.continew.starter.data.core.enums.QueryType;
import top.continew.starter.data.core.util.SqlInjectionUtils;
import top.continew.starter.core.util.validation.ValidationUtils;
import top.continew.starter.data.annotation.Query;
import top.continew.starter.data.annotation.QueryIgnore;
import top.continew.starter.data.enums.QueryType;
import java.lang.reflect.Field;
import java.util.ArrayList;

View File

@@ -1 +1 @@
top.continew.starter.data.mf.autoconfigure.MybatisFlexAutoConfiguration
top.continew.starter.data.autoconfigure.MybatisFlexAutoConfiguration

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-data</artifactId>
<version>${revision}</version>
</parent>
@@ -18,7 +18,7 @@
<dependencies>
<!-- 数据访问模块 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-data-core</artifactId>
</dependency>
@@ -27,6 +27,11 @@
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
</dependency>
<!-- MyBatis Plus jsqlparser 适配(包含原扩展模块内容) -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-jsqlparser</artifactId>
</dependency>
<!-- P6SpySQL 性能分析组件) -->
<dependency>

View File

@@ -14,12 +14,12 @@
* limitations under the License.
*/
package top.continew.starter.data.mp.autoconfigure;
package top.continew.starter.data.autoconfigure;
import com.baomidou.mybatisplus.annotation.DbType;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import top.continew.starter.data.mp.autoconfigure.idgenerator.MyBatisPlusIdGeneratorProperties;
import top.continew.starter.data.autoconfigure.idgenerator.MyBatisPlusIdGeneratorProperties;
/**
* MyBatis Plus 扩展配置属性

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mp.autoconfigure;
package top.continew.starter.data.autoconfigure;
import cn.hutool.extra.spring.SpringUtil;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusPropertiesCustomizer;
@@ -38,8 +38,8 @@ import org.springframework.context.annotation.PropertySource;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import top.continew.starter.core.constant.PropertiesConstants;
import top.continew.starter.core.util.GeneralPropertySourceFactory;
import top.continew.starter.data.mp.autoconfigure.idgenerator.MyBatisPlusIdGeneratorConfiguration;
import top.continew.starter.data.mp.handler.CompositeBaseEnumTypeHandler;
import top.continew.starter.data.autoconfigure.idgenerator.MyBatisPlusIdGeneratorConfiguration;
import top.continew.starter.data.handler.CompositeBaseEnumTypeHandler;
import java.util.Map;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mp.autoconfigure.idgenerator;
package top.continew.starter.data.autoconfigure.idgenerator;
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import me.ahoo.cosid.snowflake.SnowflakeId;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mp.autoconfigure.idgenerator;
package top.continew.starter.data.autoconfigure.idgenerator;
import cn.hutool.core.net.NetUtil;
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;

View File

@@ -14,9 +14,9 @@
* limitations under the License.
*/
package top.continew.starter.data.mp.autoconfigure.idgenerator;
package top.continew.starter.data.autoconfigure.idgenerator;
import top.continew.starter.data.mp.enums.MyBatisPlusIdGeneratorType;
import top.continew.starter.data.enums.MyBatisPlusIdGeneratorType;
/**
* MyBatis ID 生成器配置属性

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mp.enums;
package top.continew.starter.data.enums;
/**
* MyBatis ID 生成器类型枚举

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mp.handler;
package top.continew.starter.data.handler;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import org.apache.ibatis.type.EnumTypeHandler;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mp.handler;
package top.continew.starter.data.handler;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mp.base;
package top.continew.starter.data.mapper;
import cn.hutool.core.util.ClassUtil;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;

View File

@@ -1,72 +0,0 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.starter.data.mp.service.impl;
import cn.hutool.core.util.ClassUtil;
import top.continew.starter.core.util.ReflectUtils;
import top.continew.starter.core.validation.CheckUtils;
import top.continew.starter.data.mp.base.BaseMapper;
import top.continew.starter.data.mp.service.IService;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.List;
/**
* 通用业务实现类
*
* @param <M> Mapper 接口
* @param <T> 实体类型
* @author Charles7c
* @since 1.5.0
*/
public class ServiceImpl<M extends BaseMapper<T>, T> extends com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M, T> implements IService<T> {
private List<Field> entityFields;
@Override
public T getById(Serializable id) {
return this.getById(id, true);
}
/**
* 获取当前实体类型字段
*
* @return 当前实体类型字段列表
*/
public List<Field> getEntityFields() {
if (this.entityFields == null) {
this.entityFields = ReflectUtils.getNonStaticFields(this.getEntityClass());
}
return this.entityFields;
}
/**
* 根据 ID 查询
*
* @param id ID
* @param isCheckExists 是否检查存在
* @return 实体信息
*/
protected T getById(Serializable id, boolean isCheckExists) {
T entity = baseMapper.selectById(id);
if (isCheckExists) {
CheckUtils.throwIfNotExists(entity, ClassUtil.getClassName(this.getEntityClass(), true), "ID", id);
}
return entity;
}
}

View File

@@ -14,7 +14,9 @@
* limitations under the License.
*/
package top.continew.starter.data.mp.service;
package top.continew.starter.data.service;
import com.baomidou.mybatisplus.extension.repository.IRepository;
/**
* 通用业务接口
@@ -23,4 +25,4 @@ package top.continew.starter.data.mp.service;
* @author Charles7c
* @since 1.2.0
*/
public interface IService<T> extends com.baomidou.mybatisplus.extension.service.IService<T> {}
public interface IService<T> extends IRepository<T> {}

View File

@@ -0,0 +1,323 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.starter.data.service.impl;
import cn.hutool.core.util.ClassUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.enums.SqlMethod;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.MapperProxyMetadata;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
import com.baomidou.mybatisplus.core.toolkit.*;
import com.baomidou.mybatisplus.core.toolkit.reflect.GenericTypeUtils;
import com.baomidou.mybatisplus.extension.repository.AbstractRepository;
import com.baomidou.mybatisplus.extension.repository.CrudRepository;
import com.baomidou.mybatisplus.extension.repository.IRepository;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import org.apache.ibatis.binding.MapperMethod;
import org.apache.ibatis.logging.Log;
import org.apache.ibatis.logging.LogFactory;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import top.continew.starter.core.util.ReflectUtils;
import top.continew.starter.data.service.IService;
import top.continew.starter.core.util.validation.CheckUtils;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
/**
* 通用业务实现类
*
* <p>将 MP 的 {@link CrudRepository} 迁移至本类中,减少两层继承,解决层级过多出现 Sonar 警告的问题</p>
*
* @see CrudRepository
* @param <M> Mapper 接口
* @param <T> 实体类型
* @author hubin <a href="https://gitee.com/baomidou/mybatis-plus">MyBatis Plus</a>
* @author Charles7c
* @since 1.5.0
*/
public abstract class ServiceImpl<M extends BaseMapper<T>, T> implements IService<T> {
@Autowired
protected M baseMapper;
private Class<T> entityClass;
private Class<M> mapperClass;
private List<Field> entityFields;
private volatile SqlSessionFactory sqlSessionFactory;
private final Log innerLog = LogFactory.getLog(getClass());
/**
* TableId 注解存在更新记录,否插入一条记录
*
* @param entity 实体对象
* @return boolean
* @see AbstractRepository#saveOrUpdate(Object)
*/
@Override
public boolean saveOrUpdate(T entity) {
return getBaseMapper().insertOrUpdate(entity);
}
/**
* 根据 Wrapper查询一条记录
*
* @param queryWrapper 实体对象封装操作类 {@link com.baomidou.mybatisplus.core.conditions.query.QueryWrapper}
* @param throwEx 有多个 result 是否抛出异常
* @return 单条数据
* @see AbstractRepository#getOne(Wrapper, boolean)
*/
@Override
public T getOne(Wrapper<T> queryWrapper, boolean throwEx) {
return getBaseMapper().selectOne(queryWrapper, throwEx);
}
/**
* 根据 Wrapper查询一条记录
*
* @param queryWrapper 实体对象封装操作类 {@link com.baomidou.mybatisplus.core.conditions.query.QueryWrapper}
* @param throwEx 有多个 result 是否抛出异常
* @return {@link Optional} 返回一个Optional对象
* @see AbstractRepository#getOneOpt(Wrapper, boolean)
*/
@Override
public Optional<T> getOneOpt(Wrapper<T> queryWrapper, boolean throwEx) {
return Optional.ofNullable(getBaseMapper().selectOne(queryWrapper, throwEx));
}
/**
* 根据 Wrapper查询一条记录
*
* @param queryWrapper 实体对象封装操作类 {@link com.baomidou.mybatisplus.core.conditions.query.QueryWrapper}
* @return 单条数据
* @see AbstractRepository#getMap(Wrapper)
*/
@Override
public Map<String, Object> getMap(Wrapper<T> queryWrapper) {
return SqlHelper.getObject(innerLog, getBaseMapper().selectMaps(queryWrapper));
}
/**
* 根据 Wrapper查询一条记录
*
* @param queryWrapper 实体对象封装操作类 {@link com.baomidou.mybatisplus.core.conditions.query.QueryWrapper}
* @param mapper 转换函数
* @return 单条数据
* @see AbstractRepository#getObj(Wrapper, Function)
*/
@Override
public <V> V getObj(Wrapper<T> queryWrapper, Function<? super Object, V> mapper) {
return SqlHelper.getObject(innerLog, listObjs(queryWrapper, mapper));
}
/**
* 执行批量操作
*
* @param list 数据集合
* @param batchSize 批量大小
* @param consumer 执行方法
* @param <E> 泛型
* @return 操作结果
* @see AbstractRepository#executeBatch(Collection, int, BiConsumer)
*/
protected <E> boolean executeBatch(Collection<E> list, int batchSize, BiConsumer<SqlSession, E> consumer) {
return SqlHelper.executeBatch(getSqlSessionFactory(), this.innerLog, list, batchSize, consumer);
}
/**
* 执行批量操作(默认批次提交数量{@link IRepository#DEFAULT_BATCH_SIZE}
*
* @param list 数据集合
* @param consumer 执行方法
* @param <E> 泛型
* @return 操作结果
* @see AbstractRepository#executeBatch(Collection, BiConsumer)
*/
protected <E> boolean executeBatch(Collection<E> list, BiConsumer<SqlSession, E> consumer) {
return executeBatch(list, DEFAULT_BATCH_SIZE, consumer);
}
/**
* 根据 ID 删除
*
* @param id 主键(类型必须与实体类型字段保持一致)
* @param useFill 是否启用填充(为true的情况,会将入参转换实体进行delete删除)
* @return 删除结果
* @see AbstractRepository#removeById(Serializable, boolean)
*/
@Override
public boolean removeById(Serializable id, boolean useFill) {
return SqlHelper.retBool(getBaseMapper().deleteById(id, useFill));
}
/**
* 批量插入
*
* @param entityList 数据集合
* @param batchSize 批量大小
* @return boolean
* @see CrudRepository#saveBatch(Collection, int)
*/
@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveBatch(Collection<T> entityList, int batchSize) {
String sqlStatement = getSqlStatement(SqlMethod.INSERT_ONE);
return executeBatch(entityList, batchSize, (sqlSession, entity) -> sqlSession.insert(sqlStatement, entity));
}
/**
* 批量插入
*
* @param entityList 数据集合
* @param batchSize 批量大小
* @return boolean
* @see CrudRepository#saveOrUpdateBatch(Collection, int)
*/
@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveOrUpdateBatch(Collection<T> entityList, int batchSize) {
TableInfo tableInfo = TableInfoHelper.getTableInfo(this.getEntityClass());
Assert.notNull(tableInfo, "error: can not execute. because can not find cache of TableInfo for entity!");
String keyProperty = tableInfo.getKeyProperty();
Assert.notEmpty(keyProperty, "error: can not execute. because can not find column for id from entity!");
return SqlHelper.saveOrUpdateBatch(getSqlSessionFactory(), this
.getMapperClass(), this.innerLog, entityList, batchSize, (sqlSession, entity) -> {
Object idVal = tableInfo.getPropertyValue(entity, keyProperty);
return StringUtils.checkValNull(idVal) || CollectionUtils.isEmpty(sqlSession
.selectList(getSqlStatement(SqlMethod.SELECT_BY_ID), entity));
}, (sqlSession, entity) -> {
MapperMethod.ParamMap<T> param = new MapperMethod.ParamMap<>();
param.put(Constants.ENTITY, entity);
sqlSession.update(getSqlStatement(SqlMethod.UPDATE_BY_ID), param);
});
}
/**
* 批量更新
*
* @param entityList 数据集合
* @param batchSize 批量大小
* @return boolean
* @see CrudRepository#updateBatchById(Collection, int)
*/
@Transactional(rollbackFor = Exception.class)
@Override
public boolean updateBatchById(Collection<T> entityList, int batchSize) {
String sqlStatement = getSqlStatement(SqlMethod.UPDATE_BY_ID);
return executeBatch(entityList, batchSize, (sqlSession, entity) -> {
MapperMethod.ParamMap<T> param = new MapperMethod.ParamMap<>();
param.put(Constants.ENTITY, entity);
sqlSession.update(sqlStatement, param);
});
}
@Override
public T getById(Serializable id) {
return this.getById(id, true);
}
@Override
public M getBaseMapper() {
Assert.notNull(this.baseMapper, "baseMapper can not be null");
return this.baseMapper;
}
@Override
public Class<T> getEntityClass() {
if (this.entityClass == null) {
this.entityClass = (Class<T>)GenericTypeUtils.resolveTypeArguments(this
.getMapperClass(), BaseMapper.class)[0];
}
return this.entityClass;
}
/**
* 获取当前 Mapper 类型
*
* @return 当前 Mapper 类型
* @see CrudRepository#getMapperClass()
*/
public Class<M> getMapperClass() {
if (this.mapperClass == null) {
MapperProxyMetadata mapperProxyMetadata = MybatisUtils.getMapperProxy(this.getBaseMapper());
this.mapperClass = (Class<M>)mapperProxyMetadata.getMapperInterface();
}
return this.mapperClass;
}
/**
* 获取当前实体类型字段
*
* @return 当前实体类型字段列表
*/
public List<Field> getEntityFields() {
if (this.entityFields == null) {
this.entityFields = ReflectUtils.getNonStaticFields(this.getEntityClass());
}
return this.entityFields;
}
/**
* 获取 SqlSessionFactory
*
* @return SqlSessionFactory
* @see AbstractRepository#getSqlSessionFactory()
*/
protected SqlSessionFactory getSqlSessionFactory() {
if (this.sqlSessionFactory == null) {
MapperProxyMetadata mapperProxyMetadata = MybatisUtils.getMapperProxy(this.getBaseMapper());
this.sqlSessionFactory = MybatisUtils.getSqlSessionFactory(mapperProxyMetadata.getSqlSession());
}
return this.sqlSessionFactory;
}
/**
* 获取mapperStatementId
*
* @param sqlMethod 方法名
* @return 命名id
* @see CrudRepository#getSqlStatement(SqlMethod)
*/
protected String getSqlStatement(SqlMethod sqlMethod) {
return SqlHelper.getSqlStatement(this.getMapperClass(), sqlMethod);
}
/**
* 根据 ID 查询
*
* @param id ID
* @param isCheckExists 是否检查存在
* @return 实体信息
*/
protected T getById(Serializable id, boolean isCheckExists) {
T entity = baseMapper.selectById(id);
if (isCheckExists) {
CheckUtils.throwIfNotExists(entity, ClassUtil.getClassName(this.getEntityClass(), true), "ID", id);
}
return entity;
}
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.data.mp.util;
package top.continew.starter.data.util;
import cn.hutool.core.annotation.AnnotationUtil;
import cn.hutool.core.collection.CollUtil;
@@ -28,11 +28,10 @@ import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Sort;
import top.continew.starter.core.exception.BadRequestException;
import top.continew.starter.core.util.ReflectUtils;
import top.continew.starter.core.validation.ValidationUtils;
import top.continew.starter.data.core.annotation.Query;
import top.continew.starter.data.core.annotation.QueryIgnore;
import top.continew.starter.data.core.enums.QueryType;
import top.continew.starter.data.core.util.SqlInjectionUtils;
import top.continew.starter.core.util.validation.ValidationUtils;
import top.continew.starter.data.annotation.Query;
import top.continew.starter.data.annotation.QueryIgnore;
import top.continew.starter.data.enums.QueryType;
import java.lang.reflect.Field;
import java.util.ArrayList;

View File

@@ -1 +1 @@
top.continew.starter.data.mp.autoconfigure.MybatisPlusAutoConfiguration
top.continew.starter.data.autoconfigure.MybatisPlusAutoConfiguration

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter</artifactId>
<version>${revision}</version>
</parent>
@@ -24,7 +24,7 @@
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-core</artifactId>
</dependency>
</dependencies>

View File

@@ -4,7 +4,7 @@
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>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-dependencies</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
@@ -14,42 +14,44 @@
<properties>
<!-- 项目版本号 -->
<revision>2.12.2</revision>
<spring-boot.version>3.3.11</spring-boot.version>
<revision>2.13.0</revision>
<spring-boot.version>3.3.12</spring-boot.version>
<spring-cloud.version>2023.0.5</spring-cloud.version>
<redisson.version>3.46.0</redisson.version>
<redisson.version>3.49.0</redisson.version>
<jetcache.version>2.7.8</jetcache.version>
<cosid.version>2.12.3</cosid.version>
<sa-token.version>1.42.0</sa-token.version>
<cosid.version>2.13.0</cosid.version>
<sa-token.version>1.44.0</sa-token.version>
<just-auth.version>1.16.7</just-auth.version>
<mybatis-plus.version>3.5.8</mybatis-plus.version>
<mybatis-plus.version>3.5.12</mybatis-plus.version>
<mybatis-flex.version>1.10.9</mybatis-flex.version>
<dynamic-datasource.version>4.3.1</dynamic-datasource.version>
<p6spy.version>3.9.1</p6spy.version>
<snail-job.version>1.4.0</snail-job.version>
<sms4j.version>3.3.4</sms4j.version>
<snail-job.version>1.5.0</snail-job.version>
<sms4j.version>3.3.5</sms4j.version>
<aj-captcha.version>1.4.0</aj-captcha.version>
<easy-captcha.version>1.6.2</easy-captcha.version>
<nashorn.version>15.6</nashorn.version>
<easy-excel.version>3.3.4</easy-excel.version>
<fastexcel.version>1.2.0</fastexcel.version>
<poi.version>5.4.1</poi.version>
<x-file-storage.version>2.2.1</x-file-storage.version>
<aws-s3.version>1.12.783</aws-s3.version>
<s3.version>2.31.35</s3.version>
<s3-crt.version>0.38.1</s3-crt.version>
<aws-s3-v1.version>1.12.783</aws-s3-v1.version>
<aws-sdk.version>2.31.63</aws-sdk.version>
<aws-crt.version>0.38.5</aws-crt.version>
<thumbnails.version>0.4.20</thumbnails.version>
<graceful-response.version>5.0.5-boot3</graceful-response.version>
<spel-validator.version>0.5.0-beta</spel-validator.version>
<crane4j.version>2.9.0</crane4j.version>
<knife4j.version>4.5.0</knife4j.version>
<tlog.version>1.5.2</tlog.version>
<truelicense.version>1.33</truelicense.version>
<zip4j.version>2.11.5</zip4j.version>
<okhttp.version>4.12.0</okhttp.version>
<ttl.version>2.14.5</ttl.version>
<ip2region.version>3.3.6</ip2region.version>
<hutool.version>5.8.37</hutool.version>
<hutool.version>5.8.38</hutool.version>
<snakeyaml.version>2.4</snakeyaml.version>
<truelicense.version>1.33</truelicense.version>
<zip4j.version>2.11.5</zip4j.version>
<!-- 解决部分传递依赖漏洞问题 -->
<commons-beanutils.version>1.9.4</commons-beanutils.version>
<commons-beanutils.version>1.11.0</commons-beanutils.version>
<commons-io.version>2.17.0</commons-io.version>
<commons-compress.version>1.26.0</commons-compress.version>
<!-- Maven Plugin Versions -->
@@ -131,9 +133,6 @@
</dependency>
<!-- MyBatis PlusMyBatis 的增强工具,在 MyBatis 的基础上只做增强不做改变,简化开发、提高效率) -->
<!-- 注意:
1、此注释在升级到 mybatis-plus 3.5.9 之后的版本时才进行启用,同时删掉后续相对应的mybatis-plus依赖
2、不升级版本可忽略不计,此处仅为了后续升级,做准备
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-bom</artifactId>
@@ -141,22 +140,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>
-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-core</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-extension</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<!-- MyBatis FlexMyBatis 的增强工具,在 MyBatis 的基础上只做增强不做改变,简化开发、提高效率) -->
<dependency>
@@ -226,11 +209,18 @@
<version>${nashorn.version}</version>
</dependency>
<!-- Easy Excel基于 Java 的快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
<!-- FastExcel基于 Java 的快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>${easy-excel.version}</version>
<groupId>cn.idev.excel</groupId>
<artifactId>fastexcel</artifactId>
<version>${fastexcel.version}</version>
</dependency>
<!-- Apache POI适用于 Microsoft 文档的 Java API -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<!-- X File Storage一行代码将文件存储到本地、FTP、SFTP、WebDAV、阿里云 OSS、华为云 OBS...等其它兼容 S3 协议的存储平台) -->
@@ -244,27 +234,23 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>${aws-s3.version}</version>
<version>${aws-s3-v1.version}</version>
</dependency>
<!-- S3 for Java 2.x -->
<!-- Amazon SDK -->
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>${s3.version}</version>
</dependency>
<!-- 基于 AWS CRT 的 S3 客户端的性能增强的 S3 传输管理器 -->
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3-transfer-manager</artifactId>
<version>${s3.version}</version>
<artifactId>bom</artifactId>
<version>${aws-sdk.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- 使用 AWS 基于 CRT 的 S3 客户端 -->
<dependency>
<groupId>software.amazon.awssdk.crt</groupId>
<artifactId>aws-crt</artifactId>
<version>${s3-crt.version}</version>
<version>${aws-crt.version}</version>
</dependency>
<!-- Thumbnailator缩略图生成库 -->
@@ -281,6 +267,13 @@
<version>${graceful-response.version}</version>
</dependency>
<!-- SpEL Validator基于 SpEL 的 jakarta.validation-api 扩展增强包) -->
<dependency>
<groupId>cn.sticki</groupId>
<artifactId>spel-validator-jakarta</artifactId>
<version>${spel-validator.version}</version>
</dependency>
<!-- Crane4j基于注解的用于完成一切 “根据 A 的 key 值拿到 B再把 B 的属性映射到 A” 这类需求的字段填充框架) -->
<dependency>
<groupId>cn.crane4j</groupId>
@@ -304,11 +297,17 @@
<version>${tlog.version}</version>
</dependency>
<!-- SnakeYAML适用于 Java 的 YAML 1.1 解析器和发射器) -->
<!-- TrueLicense (开源的证书管理引擎) -->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
<groupId>de.schlichtherle.truelicense</groupId>
<artifactId>truelicense-core</artifactId>
<version>${truelicense.version}</version>
</dependency>
<!-- Zip4j (开源的 Java 处理 zip 压缩文件的开发包) -->
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>${zip4j.version}</version>
</dependency>
<!-- OkHTTP默认高效的 HTTP 客户端) -->
@@ -346,17 +345,11 @@
<version>${hutool.version}</version>
</dependency>
<!-- TrueLicense (开源的证书管理引擎) -->
<!-- SnakeYAML适用于 Java 的 YAML 1.1 解析器和发射器) -->
<dependency>
<groupId>de.schlichtherle.truelicense</groupId>
<artifactId>truelicense-core</artifactId>
<version>${truelicense.version}</version>
</dependency>
<!-- Zip4j (开源的 Java 处理 zip 压缩文件的开发包) -->
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>${zip4j.version}</version>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>
<!-- 解决部分传递依赖漏洞问题 -->
@@ -380,7 +373,7 @@
<!-- ContiNew Starter 依赖 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-bom</artifactId>
<version>${revision}</version>
<type>pom</type>

View File

@@ -0,0 +1,17 @@
<?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>top.continew.starter</groupId>
<artifactId>continew-starter-excel</artifactId>
<version>${revision}</version>
</parent>
<artifactId>continew-starter-excel-core</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>ContiNew Starter Excel 文件处理模块 - 核心模块</description>
</project>

View File

@@ -0,0 +1,54 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.excel.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Excel导出注解
*
* @author jiang4yu
* @since 2.13.0
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ExcelExport {
/**
* 字段名称
*/
String value();
/**
* 导出排序先后: 数字越小越靠前默认按Java类字段顺序导出
*/
int sort() default 0;
/**
* 导出映射格式如0-未知;1-男;2-女
*/
String kv() default "";
/**
* 导出模板示例值(有值的话,直接取该值,不做映射)
*/
String example() default "";
}

View File

@@ -0,0 +1,59 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.excel.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Excel 导入注解
*
* @author jiang4yu
* @since 2.13.0
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ExcelImport {
/**
* 字段名称
*/
String value();
/**
* 导出映射格式如0-未知;1-男;2-女
*/
String kv() default "";
/**
* 是否为必填字段(默认为非必填)
*/
boolean required() default false;
/**
* 最大长度默认255
*/
int maxLength() default 255;
/**
* 导入唯一性验证(多个字段则取联合验证)
*/
boolean unique() default false;
}

View File

@@ -0,0 +1,31 @@
<?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>top.continew.starter</groupId>
<artifactId>continew-starter-excel</artifactId>
<version>${revision}</version>
</parent>
<artifactId>continew-starter-excel-fastexcel</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>ContiNew Starter Excel 文件处理模块 - FastExcel</description>
<dependencies>
<!-- Excel 文件处理模块 - 核心模块 -->
<dependency>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-excel-core</artifactId>
</dependency>
<!-- FastExcel基于 Java 的快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
<dependency>
<groupId>cn.idev.excel</groupId>
<artifactId>fastexcel</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -14,14 +14,14 @@
* limitations under the License.
*/
package top.continew.starter.file.excel.converter;
package top.continew.starter.excel.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import cn.idev.excel.converters.Converter;
import cn.idev.excel.enums.CellDataTypeEnum;
import cn.idev.excel.metadata.GlobalConfiguration;
import cn.idev.excel.metadata.data.ReadCellData;
import cn.idev.excel.metadata.data.WriteCellData;
import cn.idev.excel.metadata.property.ExcelContentProperty;
import top.continew.starter.core.constant.StringConstants;
import top.continew.starter.core.enums.BaseEnum;

View File

@@ -14,16 +14,16 @@
* limitations under the License.
*/
package top.continew.starter.file.excel.converter;
package top.continew.starter.excel.converter;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import cn.idev.excel.converters.Converter;
import cn.idev.excel.enums.CellDataTypeEnum;
import cn.idev.excel.metadata.GlobalConfiguration;
import cn.idev.excel.metadata.data.ReadCellData;
import cn.idev.excel.metadata.data.WriteCellData;
import cn.idev.excel.metadata.property.ExcelContentProperty;
/**
* Easy Excel 大数值转换器

View File

@@ -14,16 +14,16 @@
* limitations under the License.
*/
package top.continew.starter.file.excel.converter;
package top.continew.starter.excel.converter;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.text.CharSequenceUtil;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import cn.idev.excel.converters.Converter;
import cn.idev.excel.enums.CellDataTypeEnum;
import cn.idev.excel.metadata.GlobalConfiguration;
import cn.idev.excel.metadata.data.ReadCellData;
import cn.idev.excel.metadata.data.WriteCellData;
import cn.idev.excel.metadata.property.ExcelContentProperty;
import org.springframework.stereotype.Component;
import top.continew.starter.core.constant.StringConstants;

View File

@@ -14,18 +14,18 @@
* limitations under the License.
*/
package top.continew.starter.file.excel.util;
package top.continew.starter.excel.util;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.URLUtil;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
import cn.idev.excel.FastExcelFactory;
import cn.idev.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
import jakarta.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import top.continew.starter.core.exception.BaseException;
import top.continew.starter.file.excel.converter.ExcelBigNumberConverter;
import top.continew.starter.excel.converter.ExcelBigNumberConverter;
import java.util.Collections;
import java.util.Date;
@@ -78,7 +78,7 @@ public class ExcelUtils {
.format(new Date(), DatePattern.PURE_DATETIME_PATTERN)));
response.setHeader("Content-disposition", "attachment;filename=" + exportFileName);
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
EasyExcelFactory.write(response.getOutputStream(), clazz)
FastExcelFactory.write(response.getOutputStream(), clazz)
.autoCloseStream(false)
// 自动适配宽度
.registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())

View File

@@ -0,0 +1,35 @@
<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>top.continew.starter</groupId>
<artifactId>continew-starter-excel</artifactId>
<version>${revision}</version>
</parent>
<artifactId>continew-starter-excel-poi</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>ContiNew Starter Excel 文件处理模块 - POI</description>
<dependencies>
<!-- Excel 文件处理模块 - 核心模块 -->
<dependency>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-excel-core</artifactId>
</dependency>
<!-- Apache POI适用于 Microsoft 文档的 Java API -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
<!-- 文件上传 -->
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,107 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.starter.excel.model;
import java.util.LinkedHashMap;
/**
* Excel 字段信息
*
* @author jiang4yu
* @since 2.13.0
*/
public class ExcelClassField {
/**
* 字段名称
*/
private String fieldName;
/**
* 表头名称
*/
private String name;
/**
* 映射关系
*/
private LinkedHashMap<String, String> kvMap;
/**
* 示例值
*/
private Object example;
/**
* 排序
*/
private int sort;
/**
* 是否为注解字段0-否1-是
*/
private int hasAnnotation;
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public LinkedHashMap<String, String> getKvMap() {
return kvMap;
}
public void setKvMap(LinkedHashMap<String, String> kvMap) {
this.kvMap = kvMap;
}
public Object getExample() {
return example;
}
public void setExample(Object example) {
this.example = example;
}
public int getSort() {
return sort;
}
public void setSort(int sort) {
this.sort = sort;
}
public int getHasAnnotation() {
return hasAnnotation;
}
public void setHasAnnotation(int hasAnnotation) {
this.hasAnnotation = hasAnnotation;
}
}

View File

@@ -4,25 +4,27 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter</artifactId>
<version>${revision}</version>
</parent>
<artifactId>continew-starter-file</artifactId>
<artifactId>continew-starter-excel</artifactId>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>ContiNew Starter 文件处理模块</description>
<description>ContiNew Starter Excel 文件处理模块</description>
<modules>
<module>continew-starter-file-excel</module>
<module>continew-starter-excel-core</module>
<module>continew-starter-excel-fastexcel</module>
<module>continew-starter-excel-poi</module>
</modules>
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-core</artifactId>
</dependency>
</dependencies>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-crud</artifactId>
<version>${revision}</version>
</parent>
@@ -18,26 +18,26 @@
<dependencies>
<!-- API 文档模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-api-doc</artifactId>
</dependency>
<!-- Web 模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-web</artifactId>
</dependency>
<!-- 数据访问模块 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-data-core</artifactId>
</dependency>
<!-- 文件处理模块 - Excel -->
<!-- Excel 文件处理模块 - FastExcel -->
<dependency>
<groupId>top.continew</groupId>
<artifactId>continew-starter-file-excel</artifactId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-excel-fastexcel</artifactId>
</dependency>
<!-- Crane4j基于注解的用于完成一切 “根据 A 的 key 值拿到 B再把 B 的属性映射到 A” 这类需求的字段填充框架) -->

View File

@@ -23,7 +23,7 @@ import org.springframework.core.BridgeMethodResolver;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.util.ClassUtils;
import top.continew.starter.extension.crud.annotation.CrudApi;
import top.continew.starter.extension.crud.controller.AbstractBaseController;
import top.continew.starter.extension.crud.controller.AbstractCrudController;
import java.lang.reflect.Method;
import java.util.Objects;
@@ -46,8 +46,8 @@ public class CrudApiAnnotationInterceptor implements MethodInterceptor {
// 获取 @CrudApi 注解
CrudApi crudApi = AnnotatedElementUtils.findMergedAnnotation(targetMethod, CrudApi.class);
// 执行处理
AbstractBaseController controller = (AbstractBaseController)invocation.getThis();
controller.preHandle(crudApi, invocation.getArguments(), targetMethod, targetClass);
AbstractCrudController crudController = (AbstractCrudController)invocation.getThis();
crudController.preHandle(crudApi, invocation.getArguments(), targetMethod, targetClass);
return invocation.proceed();
}
}

View File

@@ -25,6 +25,7 @@ import org.springframework.web.servlet.mvc.method.RequestMappingInfo;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.util.pattern.PathPatternParser;
import top.continew.starter.core.util.ExceptionUtils;
import top.continew.starter.extension.crud.annotation.CrudApi;
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
import top.continew.starter.extension.crud.enums.Api;
@@ -50,16 +51,25 @@ public class CrudRequestMappingHandlerMapping extends RequestMappingHandlerMappi
return requestMappingInfo;
}
CrudRequestMapping crudRequestMapping = handlerType.getDeclaredAnnotation(CrudRequestMapping.class);
// 过滤 API如果非本类中定义且 API 列表中不包含,则忽略
Api[] apiArr = crudRequestMapping.api();
Api api = ExceptionUtils.exToNull(() -> Api.valueOf(method.getName().toUpperCase()));
if (method.getDeclaringClass() != handlerType && !ArrayUtil.contains(apiArr, api)) {
CrudApi crudApi = AnnotatedElementUtils.findMergedAnnotation(method, CrudApi.class);
// 过滤 API如果非本类中定义且 API 列表中不包含,则忽略
Api[] apis = crudRequestMapping.api();
if (method.getDeclaringClass() != handlerType && !ArrayUtil.contains(apis, ExceptionUtils
.exToNull(crudApi::value))) {
return null;
}
// 拼接路径(合并了 @RequestMapping 的部分能力)
return this.getMappingForMethodWrapper(method, handlerType, crudRequestMapping);
}
/**
* 获取请求映射信息
*
* @param method 方法
* @param handlerType 处理程序类型
* @param crudRequestMapping CRUD 请求映射
* @return 请求映射信息
*/
private RequestMappingInfo getMappingForMethodWrapper(@NonNull Method method,
@NonNull Class<?> handlerType,
CrudRequestMapping crudRequestMapping) {
@@ -79,6 +89,12 @@ public class CrudRequestMappingHandlerMapping extends RequestMappingHandlerMappi
return info;
}
/**
* 构建请求映射信息
*
* @param element 元素
* @return 请求映射信息
*/
private RequestMappingInfo buildRequestMappingInfo(AnnotatedElement element) {
RequestMapping requestMapping = AnnotatedElementUtils.findMergedAnnotation(element, RequestMapping.class);
RequestCondition<?> condition = (element instanceof Class<?> clazz

View File

@@ -17,7 +17,7 @@
package top.continew.starter.extension.crud.autoconfigure;
import cn.hutool.core.lang.tree.TreeNodeConfig;
import top.continew.starter.core.validation.CheckUtils;
import top.continew.starter.core.util.validation.CheckUtils;
import top.continew.starter.extension.crud.annotation.TreeField;
/**

View File

@@ -22,6 +22,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -33,23 +34,23 @@ import top.continew.starter.extension.crud.model.query.SortQuery;
import top.continew.starter.extension.crud.model.req.IdsReq;
import top.continew.starter.extension.crud.model.resp.IdResp;
import top.continew.starter.extension.crud.model.resp.BasePageResp;
import top.continew.starter.extension.crud.service.BaseService;
import top.continew.starter.extension.crud.service.CrudService;
import top.continew.starter.extension.crud.validation.CrudValidationGroup;
import java.util.List;
/**
* 控制器抽象基类
* CRUD 控制器抽象基类
*
* @param <S> 业务接口
* @param <L> 列表类型
* @param <D> 详情类型
* @param <Q> 查询条件
* @param <Q> 查询条件类型
* @param <C> 创建或修改请求参数类型
* @author Charles7c
* @since 1.0.0
*/
public abstract class AbstractBaseController<S extends BaseService<L, D, Q, C>, L, D, Q, C> implements CrudApiHandler {
public abstract class AbstractCrudController<S extends CrudService<L, D, Q, C>, L, D, Q, C> implements CrudApiHandler {
@Autowired
protected S baseService;
@@ -65,7 +66,7 @@ public abstract class AbstractBaseController<S extends BaseService<L, D, Q, C>,
@Operation(summary = "分页查询列表", description = "分页查询列表")
@ResponseBody
@GetMapping
public BasePageResp<L> page(@Validated Q query, @Validated PageQuery pageQuery) {
public BasePageResp<L> page(@Valid Q query, @Valid PageQuery pageQuery) {
return baseService.page(query, pageQuery);
}
@@ -80,7 +81,7 @@ public abstract class AbstractBaseController<S extends BaseService<L, D, Q, C>,
@Operation(summary = "查询列表", description = "查询列表")
@ResponseBody
@GetMapping("/list")
public List<L> list(@Validated Q query, @Validated SortQuery sortQuery) {
public List<L> list(@Valid Q query, @Valid SortQuery sortQuery) {
return baseService.list(query, sortQuery);
}
@@ -95,7 +96,7 @@ public abstract class AbstractBaseController<S extends BaseService<L, D, Q, C>,
@Operation(summary = "查询树列表", description = "查询树列表")
@ResponseBody
@GetMapping("/tree")
public List<Tree<Long>> tree(@Validated Q query, @Validated SortQuery sortQuery) {
public List<Tree<Long>> tree(@Valid Q query, @Valid SortQuery sortQuery) {
return baseService.tree(query, sortQuery, false);
}
@@ -124,7 +125,8 @@ public abstract class AbstractBaseController<S extends BaseService<L, D, Q, C>,
@Operation(summary = "创建数据", description = "创建数据")
@ResponseBody
@PostMapping
public IdResp<Long> create(@Validated(CrudValidationGroup.Create.class) @RequestBody C req) {
@Validated(CrudValidationGroup.Create.class)
public IdResp<Long> create(@RequestBody @Valid C req) {
return new IdResp<>(baseService.create(req));
}
@@ -139,20 +141,35 @@ public abstract class AbstractBaseController<S extends BaseService<L, D, Q, C>,
@Parameter(name = "id", description = "ID", example = "1", in = ParameterIn.PATH)
@ResponseBody
@PutMapping("/{id}")
public void update(@Validated(CrudValidationGroup.Update.class) @RequestBody C req, @PathVariable("id") Long id) {
@Validated(CrudValidationGroup.Update.class)
public void update(@RequestBody @Valid C req, @PathVariable("id") Long id) {
baseService.update(req, id);
}
/**
* 删除
*
* @param req 删除请求参数
* @param id ID
*/
@CrudApi(Api.DELETE)
@Operation(summary = "删除数据", description = "删除数据")
@Parameter(name = "id", description = "ID", example = "1", in = ParameterIn.PATH)
@ResponseBody
@DeleteMapping("/{id}")
public void delete(@PathVariable("id") Long id) {
baseService.delete(List.of(id));
}
/**
* 批量删除
*
* @param req 删除请求参数
*/
@CrudApi(Api.BATCH_DELETE)
@Operation(summary = "批量删除数据", description = "批量删除数据")
@ResponseBody
@DeleteMapping
public void delete(@Validated @RequestBody IdsReq req) {
public void batchDelete(@RequestBody @Valid IdsReq req) {
baseService.delete(req.getIds());
}
@@ -167,7 +184,7 @@ public abstract class AbstractBaseController<S extends BaseService<L, D, Q, C>,
@ExcludeFromGracefulResponse
@Operation(summary = "导出数据", description = "导出数据")
@GetMapping("/export")
public void export(@Validated Q query, @Validated SortQuery sortQuery, HttpServletResponse response) {
public void export(@Valid Q query, @Valid SortQuery sortQuery, HttpServletResponse response) {
baseService.export(query, sortQuery, response);
}
}

View File

@@ -63,4 +63,9 @@ public enum Api {
* 导出
*/
EXPORT,
/**
* 批量删除
*/
BATCH_DELETE,
}

View File

@@ -21,8 +21,8 @@ import cn.hutool.core.util.ArrayUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.data.domain.Sort;
import top.continew.starter.core.constant.StringConstants;
import top.continew.starter.core.validation.ValidationUtils;
import top.continew.starter.data.core.util.SqlInjectionUtils;
import top.continew.starter.core.util.validation.ValidationUtils;
import top.continew.starter.data.util.SqlInjectionUtils;
import java.io.Serial;
import java.io.Serializable;

View File

@@ -18,24 +18,28 @@ package top.continew.starter.extension.crud.service;
import cn.hutool.core.lang.tree.Tree;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import org.springframework.validation.annotation.Validated;
import top.continew.starter.extension.crud.model.query.PageQuery;
import top.continew.starter.extension.crud.model.query.SortQuery;
import top.continew.starter.extension.crud.model.resp.BasePageResp;
import top.continew.starter.extension.crud.model.resp.LabelValueResp;
import top.continew.starter.extension.crud.validation.CrudValidationGroup;
import java.util.List;
/**
* 业务接口基类
* CRUD 业务接口
*
* @param <L> 列表类型
* @param <D> 详情类型
* @param <Q> 查询条件
* @param <Q> 查询条件类型
* @param <C> 创建或修改请求参数类型
* @author Charles7c
* @since 1.0.0
*/
public interface BaseService<L, D, Q, C> {
public interface CrudService<L, D, Q, C> {
/**
* 分页查询列表
@@ -44,7 +48,7 @@ public interface BaseService<L, D, Q, C> {
* @param pageQuery 分页查询条件
* @return 分页列表信息
*/
BasePageResp<L> page(Q query, PageQuery pageQuery);
BasePageResp<L> page(@Valid Q query, @Valid PageQuery pageQuery);
/**
* 查询列表
@@ -53,7 +57,7 @@ public interface BaseService<L, D, Q, C> {
* @param sortQuery 排序查询条件
* @return 列表信息
*/
List<L> list(Q query, SortQuery sortQuery);
List<L> list(@Valid Q query, @Valid SortQuery sortQuery);
/**
* 查询树列表
@@ -67,7 +71,7 @@ public interface BaseService<L, D, Q, C> {
* @param isSimple 是否为简单树结构不包含基本树结构之外的扩展字段简单树下拉列表使用全局配置结构复杂树表格使用 @DictField 局部配置
* @return 树列表信息
*/
List<Tree<Long>> tree(Q query, SortQuery sortQuery, boolean isSimple);
List<Tree<Long>> tree(@Valid Q query, @Valid SortQuery sortQuery, boolean isSimple);
/**
* 查询详情
@@ -85,7 +89,7 @@ public interface BaseService<L, D, Q, C> {
* @return 字典列表信息
* @since 2.1.0
*/
List<LabelValueResp> listDict(Q query, SortQuery sortQuery);
List<LabelValueResp> listDict(@Valid Q query, @Valid SortQuery sortQuery);
/**
* 创建
@@ -93,7 +97,8 @@ public interface BaseService<L, D, Q, C> {
* @param req 创建请求参数
* @return 自增 ID
*/
Long create(C req);
@Validated(CrudValidationGroup.Create.class)
Long create(@Valid C req);
/**
* 修改
@@ -101,14 +106,15 @@ public interface BaseService<L, D, Q, C> {
* @param req 修改请求参数
* @param id ID
*/
void update(C req, Long id);
@Validated(CrudValidationGroup.Update.class)
void update(@Valid C req, Long id);
/**
* 删除
*
* @param ids ID 列表
*/
void delete(List<Long> ids);
void delete(@NotEmpty(message = "ID 不能为空") List<Long> ids);
/**
* 导出
@@ -117,5 +123,5 @@ public interface BaseService<L, D, Q, C> {
* @param sortQuery 排序查询条件
* @param response 响应对象
*/
void export(Q query, SortQuery sortQuery, HttpServletResponse response);
void export(@Valid Q query, @Valid SortQuery sortQuery, HttpServletResponse response);
}

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-crud</artifactId>
<version>${revision}</version>
</parent>
@@ -18,13 +18,13 @@
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-crud-core</artifactId>
</dependency>
<!-- 数据访问模块 - MyBatis Flex -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-data-mf</artifactId>
</dependency>
</dependencies>

View File

@@ -33,10 +33,10 @@ import org.springframework.data.domain.Sort;
import org.springframework.transaction.annotation.Transactional;
import top.continew.starter.core.constant.StringConstants;
import top.continew.starter.core.util.ReflectUtils;
import top.continew.starter.core.validation.ValidationUtils;
import top.continew.starter.data.mf.base.BaseMapper;
import top.continew.starter.data.mf.service.impl.ServiceImpl;
import top.continew.starter.data.mf.util.QueryWrapperHelper;
import top.continew.starter.core.util.validation.ValidationUtils;
import top.continew.starter.data.base.BaseMapper;
import top.continew.starter.data.service.impl.ServiceImpl;
import top.continew.starter.data.util.QueryWrapperHelper;
import top.continew.starter.extension.crud.annotation.TreeField;
import top.continew.starter.extension.crud.autoconfigure.CrudProperties;
import top.continew.starter.extension.crud.autoconfigure.CrudTreeProperties;
@@ -44,7 +44,7 @@ import top.continew.starter.extension.crud.model.entity.BaseIdDO;
import top.continew.starter.extension.crud.model.query.PageQuery;
import top.continew.starter.extension.crud.model.query.SortQuery;
import top.continew.starter.extension.crud.model.resp.PageResp;
import top.continew.starter.file.excel.util.ExcelUtils;
import top.continew.starter.excel.util.ExcelUtils;
import java.lang.reflect.Field;
import java.util.ArrayList;
@@ -52,18 +52,18 @@ import java.util.List;
import java.util.Optional;
/**
* 业务实现基类
* CRUD 业务实现基类
*
* @param <M> Mapper 接口
* @param <T> 实体类型
* @param <L> 列表类型
* @param <D> 详情类型
* @param <Q> 查询条件
* @param <Q> 查询条件类型
* @param <C> 创建或修改请求参数类型
* @author Charles7c
* @since 1.0.0
*/
public abstract class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseIdDO, L, D, Q, C> extends ServiceImpl<M, T> implements BaseService<L, D, Q, C> {
public abstract class CrudServiceImpl<M extends BaseMapper<T>, T extends BaseIdDO, L, D, Q, C> extends ServiceImpl<M, T> implements CrudService<L, D, Q, C> {
protected final Class<L> listClass = this.currentListClass();
protected final Class<D> detailClass = this.currentDetailClass();

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-crud</artifactId>
<version>${revision}</version>
</parent>
@@ -18,13 +18,13 @@
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-crud-core</artifactId>
</dependency>
<!-- 数据访问模块 - MyBatis Plus -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-data-mp</artifactId>
</dependency>
</dependencies>

View File

@@ -37,12 +37,9 @@ import org.springframework.transaction.annotation.Transactional;
import top.continew.starter.core.constant.StringConstants;
import top.continew.starter.core.util.ClassUtils;
import top.continew.starter.core.util.ReflectUtils;
import top.continew.starter.core.validation.CheckUtils;
import top.continew.starter.core.validation.ValidationUtils;
import top.continew.starter.data.mp.base.BaseMapper;
import top.continew.starter.data.mp.service.impl.ServiceImpl;
import top.continew.starter.data.mp.util.QueryWrapperHelper;
import top.continew.starter.extension.crud.annotation.DictModel;
import top.continew.starter.data.mapper.BaseMapper;
import top.continew.starter.data.service.impl.ServiceImpl;
import top.continew.starter.data.util.QueryWrapperHelper;
import top.continew.starter.extension.crud.annotation.DictModel;
import top.continew.starter.extension.crud.annotation.TreeField;
import top.continew.starter.extension.crud.autoconfigure.CrudProperties;
@@ -52,24 +49,26 @@ import top.continew.starter.extension.crud.model.query.PageQuery;
import top.continew.starter.extension.crud.model.query.SortQuery;
import top.continew.starter.extension.crud.model.resp.LabelValueResp;
import top.continew.starter.extension.crud.model.resp.PageResp;
import top.continew.starter.file.excel.util.ExcelUtils;
import top.continew.starter.excel.util.ExcelUtils;
import top.continew.starter.core.util.validation.CheckUtils;
import top.continew.starter.core.util.validation.ValidationUtils;
import java.lang.reflect.Field;
import java.util.*;
/**
* 业务实现基类
* CRUD 业务实现基类
*
* @param <M> Mapper 接口
* @param <T> 实体类型
* @param <L> 列表类型
* @param <D> 详情类型
* @param <Q> 查询条件
* @param <Q> 查询条件类型
* @param <C> 创建或修改参数类型
* @author Charles7c
* @since 1.0.0
*/
public abstract class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseIdDO, L, D, Q, C> extends ServiceImpl<M, T> implements BaseService<L, D, Q, C> {
public abstract class CrudServiceImpl<M extends BaseMapper<T>, T extends BaseIdDO, L, D, Q, C> extends ServiceImpl<M, T> implements CrudService<L, D, Q, C> {
private Class<L> listClass;
private Class<D> detailClass;

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension</artifactId>
<version>${revision}</version>
</parent>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-datapermission</artifactId>
<version>${revision}</version>
</parent>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-datapermission</artifactId>
<version>${revision}</version>
</parent>
@@ -16,22 +16,22 @@
<description>ContiNew Starter 扩展模块 - 数据权限 - MyBatis Plus ORM 模块</description>
<dependencies>
<!-- MyBatis PlusMyBatis 的增强工具,在 MyBatis 的基础上只做增强不做改变,简化开发、提高效率) -->
<!-- 数据权限 - 核心模块 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-extension</artifactId>
</dependency>
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-datapermission-core</artifactId>
</dependency>
<!-- ContiNew Starter 数据访问模块 - 核心模块-->
<!-- 数据访问模块 - 核心模块-->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-data-core</artifactId>
</dependency>
<!-- MyBatis Plus jsqlparser 适配(包含原扩展模块内容) -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-jsqlparser</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -43,8 +43,8 @@ import net.sf.jsqlparser.statement.select.ParenthesedSelect;
import net.sf.jsqlparser.statement.select.PlainSelect;
import net.sf.jsqlparser.statement.select.SelectItem;
import top.continew.starter.core.constant.StringConstants;
import top.continew.starter.data.core.enums.DatabaseType;
import top.continew.starter.data.core.util.MetaUtils;
import top.continew.starter.data.enums.DatabaseType;
import top.continew.starter.data.util.MetaUtils;
import top.continew.starter.extension.datapermission.annotation.DataPermission;
import top.continew.starter.extension.datapermission.enums.DataScope;
import top.continew.starter.extension.datapermission.filter.DataPermissionUserContextProvider;

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension</artifactId>
<version>${revision}</version>
</parent>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-tenant</artifactId>
<version>${revision}</version>
</parent>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-tenant</artifactId>
<version>${revision}</version>
</parent>
@@ -16,10 +16,16 @@
<description>ContiNew Starter 扩展模块 - 多租户 - MyBatis Plus ORM 模块</description>
<dependencies>
<!-- MyBatis PlusMyBatis 的增强工具,在 MyBatis 的基础上只做增强不做改变,简化开发、提高效率) -->
<!-- 多租户 - 核心模块 -->
<dependency>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension-tenant-core</artifactId>
</dependency>
<!-- MyBatis Plus jsqlparser 适配(包含原扩展模块内容) -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-extension</artifactId>
<artifactId>mybatis-plus-jsqlparser</artifactId>
</dependency>
<!-- Dynamic Datasource基于 Spring Boot 的快速集成多数据源的启动器) -->
@@ -27,11 +33,5 @@
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
</dependency>
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<artifactId>continew-starter-extension-tenant-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-extension</artifactId>
<version>${revision}</version>
</parent>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter</artifactId>
<version>${revision}</version>
</parent>
@@ -24,7 +24,7 @@
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-core</artifactId>
</dependency>
</dependencies>

View File

@@ -1,25 +0,0 @@
<?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>top.continew</groupId>
<artifactId>continew-starter-file</artifactId>
<version>${revision}</version>
</parent>
<artifactId>continew-starter-file-excel</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>ContiNew Starter 文件处理模块 - Excel</description>
<dependencies>
<!-- Easy Excel基于 Java 的、快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -4,7 +4,7 @@
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>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter</artifactId>
<version>${revision}</version>
</parent>
@@ -18,7 +18,7 @@
<dependencies>
<!-- 缓存模块 - Redisson -->
<dependency>
<groupId>top.continew</groupId>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter-cache-redisson</artifactId>
</dependency>

Some files were not shown because too many files have changed in this diff Show More