mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-11-13 04:57:13 +08:00
Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e78305e27 | |||
|
|
3e60197a31 | ||
| 881fd37dd6 | |||
| 9bee01baa3 | |||
| 1faa46e125 | |||
|
|
62121b78ec | ||
| e3de3b6721 | |||
| 5b76534df7 | |||
| 57eef274a3 | |||
| f138e5cd45 | |||
| ca6c7098b1 | |||
| 596605b27b | |||
| b5dd5c7f18 | |||
|
|
cde9b01fc1 | ||
| c5e2516acd | |||
| 2d71eca075 | |||
| fe310bcb87 | |||
| 8695cf9e09 | |||
| b0e567d749 | |||
| f757438d1b | |||
|
|
c4051a6465 | ||
| dbb7a6319e | |||
|
|
2573fb04f0 | ||
| 8c91d4a26c | |||
|
|
2656da450c | ||
| 2ff05c82ee | |||
| 24fda9a84e | |||
| 0f43e1cff7 | |||
| 171040b674 | |||
| ab4a72e0ff | |||
| ed15115e44 |
17
.github/workflows/deploy.yml
vendored
17
.github/workflows/deploy.yml
vendored
@@ -8,23 +8,6 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
# Qodana 扫描
|
||||
qodana-scan:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
checks: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
|
||||
fetch-depth: 0 # a full history is required for pull request analysis
|
||||
- name: Scan
|
||||
uses: JetBrains/qodana-action@v2023.3
|
||||
env:
|
||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
||||
# Sonar 扫描
|
||||
sonar-scan:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
85
CHANGELOG.md
85
CHANGELOG.md
@@ -1,3 +1,88 @@
|
||||
## [v2.0.2](https://github.com/Charles7c/continew-starter/compare/v2.0.1...v2.0.2) (2024-05-20)
|
||||
|
||||
### ✨ 新特性
|
||||
|
||||
- 【file/excel】新增 Easy Excel List 集合转换器 ([1faa46e](https://github.com/Charles7c/continew-starter/commit/1faa46e12505c025e5ca6f1a45158324ac210799))
|
||||
|
||||
### 🐛 问题修复
|
||||
|
||||
- 【captcha/behavior】修复行为验证码接口请求次数限制 ([Gitee#17](https://gitee.com/continew/continew-starter/pulls/17))
|
||||
- 【extension/crud】修复封装分页 dataList 索引计算错误 ([3e60197](https://github.com/Charles7c/continew-starter/commit/3e60197a31f140c863868440944df0427a9cf8e8))
|
||||
- 移除部分错误依赖声明 ([881fd37](https://github.com/Charles7c/continew-starter/commit/881fd37dd61836daf3343d9053e9a7c81b005923))
|
||||
|
||||
## [v2.0.1](https://github.com/Charles7c/continew-starter/compare/v2.0.0...v2.0.1) (2024-05-13)
|
||||
|
||||
### ✨ 新特性
|
||||
|
||||
- 【cache/redisson】RedisUtils 新增递增、递减方法 ([596605b](https://github.com/Charles7c/continew-starter/commit/596605b27b046fa0488b113b1c3d87c60277e4ec))
|
||||
- 【core】新增字符串工具类 ([ca6c709](https://github.com/Charles7c/continew-starter/commit/ca6c7098b124c3121fe626811ea61d53c80a9a4e))
|
||||
- 【extension/crud】新增多种实体 Base 模型降低 BaseService 耦合 ([5b76534](https://github.com/Charles7c/continew-starter/commit/5b76534df7a54aa6d696515cfbf8059fcdc4a067))
|
||||
|
||||
### 🐛 问题修复
|
||||
|
||||
- 【extension/crud】修复查询树列表方法中的错误判断 ([f138e5c](https://github.com/Charles7c/continew-starter/commit/f138e5cd4526d8be0fe5e7ae54833b4541748346))
|
||||
|
||||
### 💎 功能优化
|
||||
|
||||
- 【web】优化部分方法使用 ([57eef27](https://github.com/Charles7c/continew-starter/commit/57eef274a3e34e8bb4de6073452080b2bbdbee53))
|
||||
|
||||
### 📦 依赖升级
|
||||
|
||||
- 【dependencies】Spring Boot 3.1.10 => 3.1.11 ([GitHub#2](https://github.com/Charles7c/continew-starter/pull/2))
|
||||
- 【dependencies】SaToken 1.37.0 => 1.38.0 ([b5dd5c7](https://github.com/Charles7c/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
||||
- 【dependencies】Redisson 3.28.0 => 3.30.0 ([b5dd5c7](https://github.com/Charles7c/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
||||
- 【dependencies】Crane4j 2.7.0 => 2.8.0 ([b5dd5c7](https://github.com/Charles7c/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
||||
- 【dependencies】AWS S3 1.12.702 => 1.12.720 ([b5dd5c7](https://github.com/Charles7c/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
||||
- 【dependencies】IP2Region 3.1.10 => 3.1.11 ([b5dd5c7](https://github.com/Charles7c/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
||||
|
||||
## [v2.0.0](https://github.com/Charles7c/continew-starter/compare/v1.5.1...v2.0.0) (2024-04-17)
|
||||
|
||||
### ✨ 新特性
|
||||
|
||||
- 【web】新增 XSS 过滤器 ([2656da4](https://github.com/Charles7c/continew-starter/commit/2656da450c866681c270c30131c028847e1e21d4)) ([2573fb0](https://github.com/Charles7c/continew-starter/commit/2573fb04f0698db3ab662a0e7bf762c04300468b)) ([Gitee PR#13](https://gitee.com/continew/continew-starter/pulls/13))
|
||||
|
||||
### 🐛 问题修复
|
||||
|
||||
- 【cache/redisson】修复Failed to submit a listener notification task. Event loop shut down? 问题 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||
|
||||
### 💎 功能优化
|
||||
|
||||
- 【core】应用关闭,支持优雅关闭自定义线程池 ScheduledExecutorService ([c4051a6](https://github.com/Charles7c/continew-starter/commit/c4051a6465e0d70d119ec27c6ae4eb4d1893339a))
|
||||
- 【extension/crud】优化部分注释 ([fe310bc](https://github.com/Charles7c/continew-starter/commit/fe310bcb879d3f20eb8ead4b39436ec96b99e7f6))
|
||||
- 移除 Qodana 扫描,License 已过期 ([b0e567d](https://github.com/Charles7c/continew-starter/commit/b0e567d749b988e3f45772742a273a422a661edb))
|
||||
|
||||
### 📦 依赖升级
|
||||
|
||||
- 【dependencies】Spring Boot 3.1.9 => 3.1.10 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||
- 【dependencies】Redisson 3.27.2 => 3.28.0 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||
- 【dependencies】CosId 2.6.6 => 2.6.8 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||
- 【dependencies】SMS4J 3.1.1 => 3.2.1 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||
- 【dependencies】Easy Excel 3.3.3 => 3.3.4 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||
- 【dependencies】AWS S3 1.12.675 => 1.12.702 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||
- 【dependencies】Crane4j 2.6.1 => 2.7.0 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||
- 【dependencies】TLog 1.5.1 => 1.5.2 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||
- 【dependencies】Hutool 5.8.26 => 5.8.27 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||
- 【dependencies】IP2Region 3.1.9 => 3.1.10 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||
|
||||
### 💥 破坏性变更
|
||||
|
||||
- groupId 及基础包名调整,更短的包名,聚合品牌形象。top.charles7c.continew => top.continew ([dbb7a63](https://github.com/Charles7c/continew-starter/commit/dbb7a6319e9440e7a05f2eb4aab3b445f43197f7))
|
||||
|
||||
## [v1.5.1](https://github.com/Charles7c/continew-starter/compare/v1.5.0...v1.5.1) (2024-03-23)
|
||||
|
||||
### ✨ 新特性
|
||||
|
||||
- 【web】FileUploadUtils 新增文件下载方法 ([171040b](https://github.com/Charles7c/continew-starter/commit/171040b674ae18dd6560f1501f7c0d47a1f4b8ba))
|
||||
|
||||
### 🐛 问题修复
|
||||
|
||||
- 【api-doc】修复接口级鉴权配置不生效的问题 ([ab4a72e](https://github.com/Charles7c/continew-starter/commit/ab4a72e0fffe20b492c2250cc997ba3e94794118))
|
||||
|
||||
### 📦 依赖升级
|
||||
|
||||
- 【dependencies】Redisson 3.27.1 => 3.27.2 ([0f43e1c](https://github.com/Charles7c/continew-starter/commit/0f43e1cff7f2fc58273de300acf4432f3a300af4))
|
||||
- 【dependencies】Crane4j 2.6.0 => 2.6.1 ([0f43e1c](https://github.com/Charles7c/continew-starter/commit/0f43e1cff7f2fc58273de300acf4432f3a300af4))
|
||||
|
||||
## [v1.5.0](https://github.com/Charles7c/continew-starter/compare/v1.4.1...v1.5.0) (2024-03-08)
|
||||
|
||||
### 💎 功能优化
|
||||
|
||||
69
README.md
69
README.md
@@ -4,10 +4,10 @@
|
||||
<img src="https://img.shields.io/badge/License-LGPL--3.0-blue.svg" alt="License" />
|
||||
</a>
|
||||
<a href="https://central.sonatype.com/search?q=continew-starter" target="_blank">
|
||||
<img src="https://img.shields.io/maven-central/v/top.charles7c.continew/continew-starter.svg?label=Maven%20Central&logo=sonatype&logoColor=FFF" alt="Release" />
|
||||
<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://github.com/Charles7c/continew-starter" target="_blank">
|
||||
<img src="https://img.shields.io/badge/RELEASE-v1.5.0-%23ff3f59.svg" alt="Release" />
|
||||
<img src="https://img.shields.io/badge/RELEASE-v2.0.2-%23ff3f59.svg" alt="Release" />
|
||||
</a>
|
||||
<a href="https://app.codacy.com/gh/Charles7c/continew-starter/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade" target="_blank">
|
||||
<img src="https://app.codacy.com/project/badge/Grade/90ed633957a9410aa8745f0654827c01" alt="Codacy Badge" />
|
||||
@@ -16,7 +16,7 @@
|
||||
<img src="https://sonarcloud.io/api/project_badges/measure?project=Charles7c_continew-starter&metric=alert_status" alt="Sonar Status" />
|
||||
</a>
|
||||
<a href="https://spring.io/projects/spring-boot" target="_blank">
|
||||
<img src="https://img.shields.io/badge/Spring Boot-3.1.8-%236CB52D.svg?logo=Spring-Boot" alt="Spring Boot" />
|
||||
<img src="https://img.shields.io/badge/Spring Boot-3.1.11-%236CB52D.svg?logo=Spring-Boot" alt="Spring Boot" />
|
||||
</a>
|
||||
<a href="https://github.com/Charles7c/continew-starter" target="_blank">
|
||||
<img src="https://img.shields.io/badge/Open JDK-17-%236CB52D.svg?logo=OpenJDK&logoColor=FFF" alt="Open JDK" />
|
||||
@@ -76,7 +76,7 @@ ContiNew Starter 就是将脚手架项目中的通用基础配置进行了封装
|
||||
|
||||
```xml
|
||||
<parent>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter</artifactId>
|
||||
<version>{latest-version}</version>
|
||||
</parent>
|
||||
@@ -96,7 +96,7 @@ ContiNew Starter 就是将脚手架项目中的通用基础配置进行了封装
|
||||
<dependencies>
|
||||
<!-- ContiNew Starter Dependencies -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-dependencies</artifactId>
|
||||
<version>{latest-version}</version>
|
||||
<type>pom</type>
|
||||
@@ -112,7 +112,7 @@ ContiNew Starter 就是将脚手架项目中的通用基础配置进行了封装
|
||||
<dependencies>
|
||||
<!-- Web 模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -137,38 +137,13 @@ continew-starter.web:
|
||||
exposed-headers: '*'
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>抢先体验快照(SNAPSHOT)版本💡</summary>
|
||||
|
||||
> **注意:** 快照版本目前处于开发测试阶段,其中很多特性或改动尚不稳定,可能会因为修复或优化而频繁调整。因此,仅可用于体验,切勿用于生产环境!
|
||||
|
||||
1.在项目 pom.xml 中配置 SNAPSHOT(快照)仓库地址(如果你已配有其他仓库地址,追加下方快照仓库地址即可)
|
||||
|
||||
```xml
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>sonatype-nexus-snapshots</id>
|
||||
<name>Sonatype Nexus Snapshots</name>
|
||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
<snapshots>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
```
|
||||
|
||||
2.将 ContiNew Starter 版本改为对应快照版本,例如:1.3.0-SNAPSHOT
|
||||
|
||||
</details>
|
||||
|
||||
## 模块结构
|
||||
|
||||
### 核心模块
|
||||
|
||||
| 模块名称 | 模块说明 | 依赖版本 |
|
||||
| --------------------- | ------------------------------------ | ------------------------------------------------------------ |
|
||||
| continew-starter-core | 核心模块:包含线程池、项目等自动配置 | <a href="https://spring.io/projects/spring-boot" target="_blank">Spring Boot</a>:3.1.8<br /><a href="https://www.hutool.cn/" target="_blank">Hutool</a>:5.8.25<br />mica-ip2region:3.1.7 |
|
||||
| 模块名称 | 模块说明 | 依赖版本 |
|
||||
| --------------------- | ------------------------------------ |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| continew-starter-core | 核心模块:包含线程池、项目等自动配置 | <a href="https://spring.io/projects/spring-boot" target="_blank">Spring Boot</a>:3.1.11<br /><a href="https://www.hutool.cn/" target="_blank">Hutool</a>:5.8.25<br />mica-ip2region:3.1.7 |
|
||||
|
||||
### JSON模块
|
||||
|
||||
@@ -189,7 +164,6 @@ continew-starter.web:
|
||||
| continew-starter-security-password | 密码编码器 | |
|
||||
| continew-starter-security-mask | JSON 脱敏 | |
|
||||
| continew-starter-security-crypto | 数据库字段加/解密 | |
|
||||
| continew-starter-security-all | | |
|
||||
|
||||
### Web模块
|
||||
|
||||
@@ -212,9 +186,9 @@ continew-starter.web:
|
||||
|
||||
### 文件处理模块
|
||||
|
||||
| 模块名称 | 模块说明 | 依赖版本 |
|
||||
| --------------------------- | -------------- | ------------------------------------------------------------ |
|
||||
| continew-starter-file-excel | Excel 相关配置 | <a href="https://easyexcel.opensource.alibaba.com/" target="_blank">Easy Excel</a>:3.3.3 |
|
||||
| 模块名称 | 模块说明 | 依赖版本 |
|
||||
| --------------------------- | -------------- |------------------------------------------------------------------------------------------|
|
||||
| continew-starter-file-excel | Excel 相关配置 | <a href="https://easyexcel.opensource.alibaba.com/" target="_blank">Easy Excel</a>:3.3.4 |
|
||||
|
||||
### 验证码模块
|
||||
|
||||
@@ -225,11 +199,11 @@ continew-starter.web:
|
||||
|
||||
### 缓存模块
|
||||
|
||||
| 模块名称 | 模块说明 | 依赖版本 |
|
||||
| ---------------------------------- | --------------------- | ------------------------------------------------------------ |
|
||||
| continew-starter-cache-redisson | Redisson 自动配置 | <a href="https://github.com/redisson/redisson/wiki/Redisson%E9%A1%B9%E7%9B%AE%E4%BB%8B%E7%BB%8D" target="_blank">Redisson</a>:3.26.0 |
|
||||
| continew-starter-cache-springcache | Spring Cache 自动配置 | |
|
||||
| continew-starter-cache-jetcache | JetCache 自动配置 | |
|
||||
| 模块名称 | 模块说明 | 依赖版本 |
|
||||
| ---------------------------------- | --------------------- |--------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| continew-starter-cache-redisson | Redisson 自动配置 | <a href="https://github.com/redisson/redisson/wiki/Redisson%E9%A1%B9%E7%9B%AE%E4%BB%8B%E7%BB%8D" target="_blank">Redisson</a>:3.30.0 |
|
||||
| continew-starter-cache-springcache | Spring Cache 自动配置 | |
|
||||
| continew-starter-cache-jetcache | JetCache 自动配置 | |
|
||||
|
||||
### 数据访问模块
|
||||
|
||||
@@ -240,17 +214,16 @@ continew-starter.web:
|
||||
|
||||
### 认证模块
|
||||
|
||||
| 模块名称 | 模块说明 | 依赖版本 |
|
||||
| ------------------------------ | ----------------- | ------------------------------------------------------------ |
|
||||
| continew-starter-auth-satoken | SaToken 自动配置 | <a href="https://sa-token.dev33.cn/" target="_blank">Sa-Token</a>:1.37.0 |
|
||||
| continew-starter-auth-justauth | JustAuth 自动配置 | <a href="https://justauth.cn/" target="_blank">Just Auth</a>:1.16.6 |
|
||||
| 模块名称 | 模块说明 | 依赖版本 |
|
||||
| ------------------------------ | ----------------- |--------------------------------------------------------------------------|
|
||||
| continew-starter-auth-satoken | SaToken 自动配置 | <a href="https://sa-token.dev33.cn/" target="_blank">Sa-Token</a>:1.38.0 |
|
||||
| continew-starter-auth-justauth | JustAuth 自动配置 | <a href="https://justauth.cn/" target="_blank">Just Auth</a>:1.16.6 |
|
||||
|
||||
### 消息模块
|
||||
|
||||
| 模块名称 | 模块说明 | 依赖版本 |
|
||||
| ------------------------------- | -------- | ------------------------------------------------------------ |
|
||||
| continew-starter-messaging-mail | 邮件 | Jakarta Mail:1.1.0 |
|
||||
| continew-starter-messaging-sms | 短信 | <a href="https://sms4j.com/" target="_blank">SMS4J</a>:3.1.1 |
|
||||
|
||||
### 扩展模块
|
||||
|
||||
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.apidoc.autoconfigure;
|
||||
package top.continew.starter.apidoc.autoconfigure;
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import io.swagger.v3.oas.models.Components;
|
||||
@@ -38,9 +38,9 @@ import org.springframework.http.CacheControl;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import top.charles7c.continew.starter.core.autoconfigure.project.ProjectProperties;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.charles7c.continew.starter.core.util.GeneralPropertySourceFactory;
|
||||
import top.continew.starter.core.autoconfigure.project.ProjectProperties;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.core.util.GeneralPropertySourceFactory;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -86,28 +86,27 @@ public class SpringDocAutoConfiguration implements WebMvcConfigurer {
|
||||
if (null != license) {
|
||||
info.license(new License().name(license.getName()).url(license.getUrl()));
|
||||
}
|
||||
OpenAPI openAPI = new OpenAPI();
|
||||
openAPI.info(info);
|
||||
OpenAPI openApi = new OpenAPI();
|
||||
openApi.info(info);
|
||||
Components components = properties.getComponents();
|
||||
if (null != components) {
|
||||
openAPI.components(components);
|
||||
openApi.components(components);
|
||||
// 鉴权配置
|
||||
Map<String, SecurityScheme> securitySchemeMap = components.getSecuritySchemes();
|
||||
if (MapUtil.isNotEmpty(securitySchemeMap)) {
|
||||
SecurityRequirement securityRequirement = new SecurityRequirement();
|
||||
List<String> list = securitySchemeMap.values().stream().map(SecurityScheme::getName).toList();
|
||||
list.forEach(securityRequirement::addList);
|
||||
openAPI.addSecurityItem(securityRequirement);
|
||||
openApi.addSecurityItem(securityRequirement);
|
||||
}
|
||||
}
|
||||
return openAPI;
|
||||
return openApi;
|
||||
}
|
||||
|
||||
/**
|
||||
* 全局自定义配置(全局添加鉴权参数)
|
||||
*/
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public GlobalOpenApiCustomizer globalOpenApiCustomizer(SpringDocExtensionProperties properties) {
|
||||
return openApi -> {
|
||||
if (null != openApi.getPaths()) {
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.apidoc.autoconfigure;
|
||||
package top.continew.starter.apidoc.autoconfigure;
|
||||
|
||||
import io.swagger.v3.oas.models.Components;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
|
||||
/**
|
||||
* API 文档扩展配置属性
|
||||
@@ -1 +1 @@
|
||||
top.charles7c.continew.starter.apidoc.autoconfigure.SpringDocAutoConfiguration
|
||||
top.continew.starter.apidoc.autoconfigure.SpringDocAutoConfiguration
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-auth</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<!-- 缓存模块 - Redisson -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-cache-redisson</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.auth.justauth.autoconfigure;
|
||||
package top.continew.starter.auth.justauth.autoconfigure;
|
||||
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import me.zhyd.oauth.cache.AuthStateCache;
|
||||
@@ -25,8 +25,8 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import top.charles7c.continew.starter.auth.justauth.core.JustAuthStateCacheRedisImpl;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.auth.justauth.core.JustAuthStateCacheRedisImpl;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
|
||||
/**
|
||||
* JustAuth 自动配置
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.auth.justauth.core;
|
||||
package top.continew.starter.auth.justauth.core;
|
||||
|
||||
import me.zhyd.oauth.cache.AuthStateCache;
|
||||
import top.charles7c.continew.starter.cache.redisson.util.RedisUtils;
|
||||
import top.continew.starter.cache.redisson.util.RedisUtils;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -74,6 +74,6 @@ public class JustAuthStateCacheRedisImpl implements AuthStateCache {
|
||||
*/
|
||||
@Override
|
||||
public boolean containsKey(String key) {
|
||||
return RedisUtils.hasKey(RedisUtils.formatKey(KEY_PREFIX, key));
|
||||
return RedisUtils.exists(RedisUtils.formatKey(KEY_PREFIX, key));
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
top.charles7c.continew.starter.auth.justauth.autoconfigure.JustAuthAutoConfiguration
|
||||
top.continew.starter.auth.justauth.autoconfigure.JustAuthAutoConfiguration
|
||||
com.xkcoding.justauth.autoconfigure.JustAuthAutoConfiguration
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-auth</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -27,14 +27,14 @@
|
||||
|
||||
<!-- 缓存模块 - Redisson -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-cache-redisson</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.auth.satoken.autoconfigure;
|
||||
package top.continew.starter.auth.satoken.autoconfigure;
|
||||
|
||||
import cn.dev33.satoken.interceptor.SaInterceptor;
|
||||
import cn.dev33.satoken.jwt.StpLogicJwtForSimple;
|
||||
@@ -32,10 +32,10 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
||||
import org.springframework.context.annotation.*;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import top.charles7c.continew.starter.auth.satoken.autoconfigure.dao.SaTokenDaoConfiguration;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
import top.charles7c.continew.starter.core.util.GeneralPropertySourceFactory;
|
||||
import top.continew.starter.auth.satoken.autoconfigure.dao.SaTokenDaoConfiguration;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.core.util.GeneralPropertySourceFactory;
|
||||
|
||||
/**
|
||||
* Sa-Token 自动配置
|
||||
@@ -44,7 +44,7 @@ import top.charles7c.continew.starter.core.util.GeneralPropertySourceFactory;
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ComponentScan("top.charles7c.continew.starter.auth.satoken.exception")
|
||||
@ComponentScan("top.continew.starter.auth.satoken.exception")
|
||||
@EnableConfigurationProperties(SaTokenExtensionProperties.class)
|
||||
@ConditionalOnProperty(prefix = "sa-token.extension", name = PropertiesConstants.ENABLED, havingValue = "true")
|
||||
@PropertySource(value = "classpath:default-auth-satoken.yml", factory = GeneralPropertySourceFactory.class)
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.auth.satoken.autoconfigure;
|
||||
package top.continew.starter.auth.satoken.autoconfigure;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
import top.charles7c.continew.starter.auth.satoken.autoconfigure.dao.SaTokenDaoProperties;
|
||||
import top.continew.starter.auth.satoken.autoconfigure.dao.SaTokenDaoProperties;
|
||||
|
||||
/**
|
||||
* SaToken 扩展配置属性
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.auth.satoken.autoconfigure;
|
||||
package top.continew.starter.auth.satoken.autoconfigure;
|
||||
|
||||
/**
|
||||
* SaToken 安全配置属性
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.auth.satoken.autoconfigure.dao;
|
||||
package top.continew.starter.auth.satoken.autoconfigure.dao;
|
||||
|
||||
import cn.dev33.satoken.dao.SaTokenDao;
|
||||
import cn.dev33.satoken.dao.SaTokenDaoDefaultImpl;
|
||||
@@ -28,7 +28,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.core.ResolvableType;
|
||||
import top.charles7c.continew.starter.cache.redisson.autoconfigure.RedissonAutoConfiguration;
|
||||
import top.continew.starter.cache.redisson.autoconfigure.RedissonAutoConfiguration;
|
||||
|
||||
/**
|
||||
* SaToken 持久层配置
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.auth.satoken.autoconfigure.dao;
|
||||
package top.continew.starter.auth.satoken.autoconfigure.dao;
|
||||
|
||||
import top.charles7c.continew.starter.auth.satoken.enums.SaTokenDaoType;
|
||||
import top.continew.starter.auth.satoken.enums.SaTokenDaoType;
|
||||
|
||||
/**
|
||||
* SaToken 持久层配置属性
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.auth.satoken.autoconfigure.dao;
|
||||
package top.continew.starter.auth.satoken.autoconfigure.dao;
|
||||
|
||||
import cn.dev33.satoken.dao.SaTokenDao;
|
||||
import cn.dev33.satoken.util.SaFoxUtil;
|
||||
import top.charles7c.continew.starter.cache.redisson.util.RedisUtils;
|
||||
import top.continew.starter.cache.redisson.util.RedisUtils;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.auth.satoken.enums;
|
||||
package top.continew.starter.auth.satoken.enums;
|
||||
|
||||
/**
|
||||
* SaToken 持久层类型枚举
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.auth.satoken.exception;
|
||||
package top.continew.starter.auth.satoken.exception;
|
||||
|
||||
import cn.dev33.satoken.exception.NotLoginException;
|
||||
import cn.dev33.satoken.exception.NotPermissionException;
|
||||
@@ -25,7 +25,7 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
import top.charles7c.continew.starter.web.model.R;
|
||||
import top.continew.starter.web.model.R;
|
||||
|
||||
/**
|
||||
* 全局 SaToken 异常处理器
|
||||
@@ -1 +1 @@
|
||||
top.charles7c.continew.starter.auth.satoken.autoconfigure.SaTokenAutoConfiguration
|
||||
top.continew.starter.auth.satoken.autoconfigure.SaTokenAutoConfiguration
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -21,7 +21,7 @@
|
||||
<dependencies>
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-cache</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
<!-- 缓存模块 - Redisson -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-cache-redisson</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.cache.jetcache.autoconfigure;
|
||||
package top.continew.starter.cache.jetcache.autoconfigure;
|
||||
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import org.slf4j.Logger;
|
||||
@@ -22,7 +22,7 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import top.charles7c.continew.starter.core.util.GeneralPropertySourceFactory;
|
||||
import top.continew.starter.core.util.GeneralPropertySourceFactory;
|
||||
|
||||
/**
|
||||
* JetCache 自动配置
|
||||
@@ -1 +1 @@
|
||||
top.charles7c.continew.starter.cache.jetcache.autoconfigure.JetCacheAutoConfiguration
|
||||
top.continew.starter.cache.jetcache.autoconfigure.JetCacheAutoConfiguration
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-cache</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.cache.redisson.autoconfigure;
|
||||
package top.continew.starter.cache.redisson.autoconfigure;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
@@ -33,8 +33,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.cache.redisson.autoconfigure;
|
||||
package top.continew.starter.cache.redisson.autoconfigure;
|
||||
|
||||
import org.redisson.config.ClusterServersConfig;
|
||||
import org.redisson.config.SentinelServersConfig;
|
||||
@@ -14,15 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.cache.redisson.util;
|
||||
package top.continew.starter.cache.redisson.util;
|
||||
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import org.redisson.api.*;
|
||||
import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* Redis 工具类
|
||||
@@ -92,6 +91,28 @@ public class RedisUtils {
|
||||
CLIENT.getKeys().deleteByPattern(pattern);
|
||||
}
|
||||
|
||||
/**
|
||||
* 递增 1
|
||||
*
|
||||
* @param key 键
|
||||
* @return 当前值
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public static long incr(String key) {
|
||||
return CLIENT.getAtomicLong(key).incrementAndGet();
|
||||
}
|
||||
|
||||
/**
|
||||
* 递减 1
|
||||
*
|
||||
* @param key 键
|
||||
* @return 当前值
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public static long decr(String key) {
|
||||
return CLIENT.getAtomicLong(key).decrementAndGet();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置缓存过期时间
|
||||
*
|
||||
@@ -130,9 +151,8 @@ public class RedisUtils {
|
||||
* @param key 键
|
||||
* @return true:存在;false:不存在
|
||||
*/
|
||||
public static boolean hasKey(String key) {
|
||||
RKeys keys = CLIENT.getKeys();
|
||||
return keys.countExists(key) > 0;
|
||||
public static boolean exists(String key) {
|
||||
return CLIENT.getKeys().countExists(key) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,8 +162,7 @@ public class RedisUtils {
|
||||
* @return 缓存列表
|
||||
*/
|
||||
public static Collection<String> keys(String pattern) {
|
||||
Stream<String> stream = CLIENT.getKeys().getKeysStreamByPattern(pattern);
|
||||
return stream.toList();
|
||||
return CLIENT.getKeys().getKeysStreamByPattern(pattern).toList();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1 +1 @@
|
||||
top.charles7c.continew.starter.cache.redisson.autoconfigure.RedissonAutoConfiguration
|
||||
top.continew.starter.cache.redisson.autoconfigure.RedissonAutoConfiguration
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-cache</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependencies>
|
||||
<!-- 缓存模块 - Redisson -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-cache-redisson</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.cache.springcache.autoconfigure;
|
||||
package top.continew.starter.cache.springcache.autoconfigure;
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
@@ -35,7 +35,7 @@ import org.springframework.data.redis.cache.RedisCacheConfiguration;
|
||||
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
|
||||
import org.springframework.data.redis.serializer.RedisSerializationContext;
|
||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||
import top.charles7c.continew.starter.core.util.GeneralPropertySourceFactory;
|
||||
import top.continew.starter.core.util.GeneralPropertySourceFactory;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1 +1 @@
|
||||
top.charles7c.continew.starter.cache.springcache.autoconfigure.SpringCacheAutoConfiguration
|
||||
top.continew.starter.cache.springcache.autoconfigure.SpringCacheAutoConfiguration
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -22,7 +22,7 @@
|
||||
<dependencies>
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-captcha</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<!-- 缓存模块 - Redisson -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-cache-redisson</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.captcha.behavior.autoconfigure;
|
||||
package top.continew.starter.captcha.behavior.autoconfigure;
|
||||
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
@@ -31,13 +31,11 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.context.annotation.DependsOn;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
import top.charles7c.continew.starter.captcha.behavior.autoconfigure.cache.BehaviorCaptchaCacheConfiguration;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -61,18 +59,11 @@ public class BehaviorCaptchaAutoConfiguration {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义缓存实现配置
|
||||
*/
|
||||
@Configuration
|
||||
@Import({BehaviorCaptchaCacheConfiguration.Default.class, BehaviorCaptchaCacheConfiguration.Redis.class,
|
||||
BehaviorCaptchaCacheConfiguration.Custom.class})
|
||||
protected static class BehaviorCaptchaCacheAutoConfiguration {}
|
||||
|
||||
/**
|
||||
* 行为验证码服务接口
|
||||
*/
|
||||
@Bean
|
||||
@DependsOn("captchaCacheService")
|
||||
@ConditionalOnMissingBean
|
||||
public CaptchaService captchaService() {
|
||||
Properties config = new Properties();
|
||||
@@ -14,12 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.captcha.behavior.autoconfigure;
|
||||
package top.continew.starter.captcha.behavior.autoconfigure;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.anji.captcha.model.common.CaptchaTypeEnum;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import top.charles7c.continew.starter.captcha.behavior.enums.StorageType;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.captcha.behavior.enums.StorageType;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
@@ -75,37 +76,37 @@ public class BehaviorCaptchaProperties {
|
||||
/**
|
||||
* 历史数据清除开关(0:关闭;1:开启)
|
||||
*/
|
||||
private Integer historyDataClearEnable = 0;
|
||||
private String historyDataClearEnable = "0";
|
||||
|
||||
/**
|
||||
* 一分钟内接口请求次数限制开关(0:关闭;1:开启)
|
||||
*/
|
||||
private Integer reqFrequencyLimitEnable = 0;
|
||||
private String reqFrequencyLimitEnable = "0";
|
||||
|
||||
/**
|
||||
* 一分钟内验证码最多失败次数限制(默认:5次)
|
||||
*/
|
||||
private int reqGetLockLimit = 5;
|
||||
private String reqGetLockLimit = "5";
|
||||
|
||||
/**
|
||||
* 一分钟内验证码最多失败次数限制达标后锁定时间(默认:300秒)
|
||||
*/
|
||||
private int reqGetLockSeconds = 300;
|
||||
private String reqGetLockSeconds = "300";
|
||||
|
||||
/**
|
||||
* 获取验证码接口一分钟内请求次数限制(默认:100次)
|
||||
*/
|
||||
private int reqGetMinuteLimit = 100;
|
||||
private String reqGetMinuteLimit = "100";
|
||||
|
||||
/**
|
||||
* 校验检验码接口一分内请求次数限制(默认:100次)
|
||||
*/
|
||||
private int reqCheckMinuteLimit = 100;
|
||||
private String reqCheckMinuteLimit = "100";
|
||||
|
||||
/**
|
||||
* 二次校验检验码接口一分钟内请求次数限制(默认:100次)
|
||||
*/
|
||||
private int reqVerifyMinuteLimit = 100;
|
||||
private String reqVerifyMinuteLimit = "100";
|
||||
|
||||
/**
|
||||
* local缓存的阈值(默认:1000个)
|
||||
@@ -135,12 +136,12 @@ public class BehaviorCaptchaProperties {
|
||||
/**
|
||||
* 点选字体样式(默认:BOLD)
|
||||
*/
|
||||
private int fontStyle = Font.BOLD;
|
||||
private String fontStyle = Convert.toStr(Font.BOLD);
|
||||
|
||||
/**
|
||||
* 点选字体大小(默认:25)
|
||||
*/
|
||||
private int fontSize = 25;
|
||||
private String fontSize = "25";
|
||||
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
@@ -206,59 +207,59 @@ public class BehaviorCaptchaProperties {
|
||||
this.fontType = fontType;
|
||||
}
|
||||
|
||||
public Integer getHistoryDataClearEnable() {
|
||||
public String getHistoryDataClearEnable() {
|
||||
return historyDataClearEnable;
|
||||
}
|
||||
|
||||
public void setHistoryDataClearEnable(Integer historyDataClearEnable) {
|
||||
public void setHistoryDataClearEnable(String historyDataClearEnable) {
|
||||
this.historyDataClearEnable = historyDataClearEnable;
|
||||
}
|
||||
|
||||
public Integer getReqFrequencyLimitEnable() {
|
||||
public String getReqFrequencyLimitEnable() {
|
||||
return reqFrequencyLimitEnable;
|
||||
}
|
||||
|
||||
public void setReqFrequencyLimitEnable(Integer reqFrequencyLimitEnable) {
|
||||
public void setReqFrequencyLimitEnable(String reqFrequencyLimitEnable) {
|
||||
this.reqFrequencyLimitEnable = reqFrequencyLimitEnable;
|
||||
}
|
||||
|
||||
public int getReqGetLockLimit() {
|
||||
public String getReqGetLockLimit() {
|
||||
return reqGetLockLimit;
|
||||
}
|
||||
|
||||
public void setReqGetLockLimit(int reqGetLockLimit) {
|
||||
public void setReqGetLockLimit(String reqGetLockLimit) {
|
||||
this.reqGetLockLimit = reqGetLockLimit;
|
||||
}
|
||||
|
||||
public int getReqGetLockSeconds() {
|
||||
public String getReqGetLockSeconds() {
|
||||
return reqGetLockSeconds;
|
||||
}
|
||||
|
||||
public void setReqGetLockSeconds(int reqGetLockSeconds) {
|
||||
public void setReqGetLockSeconds(String reqGetLockSeconds) {
|
||||
this.reqGetLockSeconds = reqGetLockSeconds;
|
||||
}
|
||||
|
||||
public int getReqGetMinuteLimit() {
|
||||
public String getReqGetMinuteLimit() {
|
||||
return reqGetMinuteLimit;
|
||||
}
|
||||
|
||||
public void setReqGetMinuteLimit(int reqGetMinuteLimit) {
|
||||
public void setReqGetMinuteLimit(String reqGetMinuteLimit) {
|
||||
this.reqGetMinuteLimit = reqGetMinuteLimit;
|
||||
}
|
||||
|
||||
public int getReqCheckMinuteLimit() {
|
||||
public String getReqCheckMinuteLimit() {
|
||||
return reqCheckMinuteLimit;
|
||||
}
|
||||
|
||||
public void setReqCheckMinuteLimit(int reqCheckMinuteLimit) {
|
||||
public void setReqCheckMinuteLimit(String reqCheckMinuteLimit) {
|
||||
this.reqCheckMinuteLimit = reqCheckMinuteLimit;
|
||||
}
|
||||
|
||||
public int getReqVerifyMinuteLimit() {
|
||||
public String getReqVerifyMinuteLimit() {
|
||||
return reqVerifyMinuteLimit;
|
||||
}
|
||||
|
||||
public void setReqVerifyMinuteLimit(int reqVerifyMinuteLimit) {
|
||||
public void setReqVerifyMinuteLimit(String reqVerifyMinuteLimit) {
|
||||
this.reqVerifyMinuteLimit = reqVerifyMinuteLimit;
|
||||
}
|
||||
|
||||
@@ -302,19 +303,19 @@ public class BehaviorCaptchaProperties {
|
||||
this.interferenceOptions = interferenceOptions;
|
||||
}
|
||||
|
||||
public int getFontStyle() {
|
||||
public String getFontStyle() {
|
||||
return fontStyle;
|
||||
}
|
||||
|
||||
public void setFontStyle(int fontStyle) {
|
||||
public void setFontStyle(String fontStyle) {
|
||||
this.fontStyle = fontStyle;
|
||||
}
|
||||
|
||||
public int getFontSize() {
|
||||
public String getFontSize() {
|
||||
return fontSize;
|
||||
}
|
||||
|
||||
public void setFontSize(int fontSize) {
|
||||
public void setFontSize(String fontSize) {
|
||||
this.fontSize = fontSize;
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.captcha.behavior.autoconfigure.cache;
|
||||
package top.continew.starter.captcha.behavior.autoconfigure.cache;
|
||||
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.anji.captcha.service.CaptchaCacheService;
|
||||
@@ -25,40 +25,46 @@ import org.redisson.client.RedisClient;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.core.ResolvableType;
|
||||
import top.charles7c.continew.starter.cache.redisson.autoconfigure.RedissonAutoConfiguration;
|
||||
import top.charles7c.continew.starter.captcha.behavior.enums.StorageType;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.cache.redisson.autoconfigure.RedissonAutoConfiguration;
|
||||
import top.continew.starter.captcha.behavior.enums.StorageType;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
|
||||
/**
|
||||
* 行为验证码缓存配置
|
||||
* 行为验证码缓存自动配置
|
||||
*
|
||||
* @author Bull-BCLS
|
||||
* @author Charles7c
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public class BehaviorCaptchaCacheConfiguration {
|
||||
@AutoConfiguration
|
||||
public class BehaviorCaptchaCacheAutoConfiguration {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(BehaviorCaptchaCacheConfiguration.class);
|
||||
private static final Logger log = LoggerFactory.getLogger(BehaviorCaptchaCacheAutoConfiguration.class);
|
||||
|
||||
private BehaviorCaptchaCacheConfiguration() {
|
||||
private BehaviorCaptchaCacheAutoConfiguration() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义缓存实现-默认(内存)
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnMissingBean(CaptchaCacheService.class)
|
||||
@ConditionalOnProperty(name = PropertiesConstants.CAPTCHA_BEHAVIOR + ".cache-type", havingValue = "default", matchIfMissing = true)
|
||||
public static class Default {
|
||||
@Bean
|
||||
public CaptchaCacheService captchaCacheService() {
|
||||
return new CaptchaCacheServiceMemImpl();
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void postConstruct() {
|
||||
CaptchaServiceFactory.cacheService.put(StorageType.DEFAULT.name()
|
||||
.toLowerCase(), new CaptchaCacheServiceMemImpl());
|
||||
CaptchaServiceFactory.cacheService.put(StorageType.DEFAULT.name().toLowerCase(), captchaCacheService());
|
||||
log.debug("[ContiNew Starter] - Auto Configuration 'Captcha-Behavior-Cache-Default' completed initialization.");
|
||||
}
|
||||
}
|
||||
@@ -66,15 +72,19 @@ public class BehaviorCaptchaCacheConfiguration {
|
||||
/**
|
||||
* 自定义缓存实现-Redis
|
||||
*/
|
||||
@ConditionalOnMissingBean(CaptchaCacheService.class)
|
||||
@AutoConfiguration(before = RedissonAutoConfiguration.class)
|
||||
@ConditionalOnClass(RedisClient.class)
|
||||
@AutoConfigureBefore(RedissonAutoConfiguration.class)
|
||||
@ConditionalOnMissingBean(CaptchaCacheService.class)
|
||||
@ConditionalOnProperty(name = PropertiesConstants.CAPTCHA_BEHAVIOR + ".cache-type", havingValue = "redis")
|
||||
public static class Redis {
|
||||
@Bean
|
||||
public CaptchaCacheService captchaCacheService() {
|
||||
return new BehaviorCaptchaCacheServiceImpl();
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void postConstruct() {
|
||||
CaptchaServiceFactory.cacheService.put(StorageType.REDIS.name()
|
||||
.toLowerCase(), new BehaviorCaptchaCacheServiceImpl());
|
||||
CaptchaServiceFactory.cacheService.put(StorageType.REDIS.name().toLowerCase(), captchaCacheService());
|
||||
log.debug("[ContiNew Starter] - Auto Configuration 'Captcha-Behavior-Cache-Redis' completed initialization.");
|
||||
}
|
||||
}
|
||||
@@ -82,6 +92,7 @@ public class BehaviorCaptchaCacheConfiguration {
|
||||
/**
|
||||
* 自定义缓存实现
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnProperty(name = PropertiesConstants.CAPTCHA_BEHAVIOR + ".cache-type", havingValue = "custom")
|
||||
public static class Custom {
|
||||
@Bean
|
||||
@@ -14,11 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.captcha.behavior.autoconfigure.cache;
|
||||
package top.continew.starter.captcha.behavior.autoconfigure.cache;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.anji.captcha.service.CaptchaCacheService;
|
||||
import top.charles7c.continew.starter.cache.redisson.util.RedisUtils;
|
||||
import top.charles7c.continew.starter.captcha.behavior.enums.StorageType;
|
||||
import top.continew.starter.cache.redisson.util.RedisUtils;
|
||||
import top.continew.starter.captcha.behavior.enums.StorageType;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -31,12 +33,16 @@ import java.time.Duration;
|
||||
public class BehaviorCaptchaCacheServiceImpl implements CaptchaCacheService {
|
||||
@Override
|
||||
public void set(String key, String value, long expiresInSeconds) {
|
||||
RedisUtils.set(key, value, Duration.ofSeconds(expiresInSeconds));
|
||||
if (NumberUtil.isNumber(value)) {
|
||||
RedisUtils.set(key, Convert.toInt(value), Duration.ofSeconds(expiresInSeconds));
|
||||
} else {
|
||||
RedisUtils.set(key, value, Duration.ofSeconds(expiresInSeconds));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean exists(String key) {
|
||||
return RedisUtils.hasKey(key);
|
||||
return RedisUtils.exists(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,11 +52,16 @@ public class BehaviorCaptchaCacheServiceImpl implements CaptchaCacheService {
|
||||
|
||||
@Override
|
||||
public String get(String key) {
|
||||
return RedisUtils.get(key);
|
||||
return Convert.toStr(RedisUtils.get(key));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String type() {
|
||||
return StorageType.REDIS.name().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long increment(String key, long val) {
|
||||
return RedisUtils.incr(key);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.captcha.behavior.enums;
|
||||
package top.continew.starter.captcha.behavior.enums;
|
||||
|
||||
/**
|
||||
* 缓存类型枚举
|
||||
@@ -1 +1,2 @@
|
||||
top.charles7c.continew.starter.captcha.behavior.autoconfigure.BehaviorCaptchaAutoConfiguration
|
||||
top.continew.starter.captcha.behavior.autoconfigure.BehaviorCaptchaAutoConfiguration
|
||||
top.continew.starter.captcha.behavior.autoconfigure.cache.BehaviorCaptchaCacheAutoConfiguration
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-captcha</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.captcha.graphic.autoconfigure;
|
||||
package top.continew.starter.captcha.graphic.autoconfigure;
|
||||
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import org.slf4j.Logger;
|
||||
@@ -24,8 +24,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import top.charles7c.continew.starter.captcha.graphic.core.GraphicCaptchaService;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.captcha.graphic.core.GraphicCaptchaService;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
|
||||
/**
|
||||
* 图形验证码自动配置
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.captcha.graphic.autoconfigure;
|
||||
package top.continew.starter.captcha.graphic.autoconfigure;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import top.charles7c.continew.starter.captcha.graphic.enums.GraphicCaptchaType;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.captcha.graphic.enums.GraphicCaptchaType;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
|
||||
/**
|
||||
* 图形验证码配置属性
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.captcha.graphic.core;
|
||||
package top.continew.starter.captcha.graphic.core;
|
||||
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import com.wf.captcha.base.Captcha;
|
||||
import top.charles7c.continew.starter.captcha.graphic.autoconfigure.GraphicCaptchaProperties;
|
||||
import top.continew.starter.captcha.graphic.autoconfigure.GraphicCaptchaProperties;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.captcha.graphic.enums;
|
||||
package top.continew.starter.captcha.graphic.enums;
|
||||
|
||||
import com.wf.captcha.*;
|
||||
import com.wf.captcha.base.Captcha;
|
||||
@@ -1 +1 @@
|
||||
top.charles7c.continew.starter.captcha.graphic.autoconfigure.GraphicCaptchaAutoConfiguration
|
||||
top.continew.starter.captcha.graphic.autoconfigure.GraphicCaptchaAutoConfiguration
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -21,7 +21,7 @@
|
||||
<dependencies>
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.autoconfigure.project;
|
||||
package top.continew.starter.core.autoconfigure.project;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.autoconfigure.project;
|
||||
package top.continew.starter.core.autoconfigure.project;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.autoconfigure.threadpool;
|
||||
package top.continew.starter.core.autoconfigure.threadpool;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import org.slf4j.Logger;
|
||||
@@ -25,8 +25,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.scheduling.annotation.AsyncConfigurer;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.charles7c.continew.starter.core.exception.BaseException;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.core.exception.BaseException;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -14,12 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.autoconfigure.threadpool;
|
||||
package top.continew.starter.core.autoconfigure.threadpool;
|
||||
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
@@ -27,12 +28,16 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.charles7c.continew.starter.core.util.ExceptionUtils;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.core.util.ExceptionUtils;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.RunnableFuture;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 线程池自动配置
|
||||
@@ -69,6 +74,10 @@ public class ThreadPoolAutoConfiguration {
|
||||
executor.setKeepAliveSeconds(properties.getKeepAliveSeconds());
|
||||
// 配置当池内线程数已达到上限的时候,该如何处理新任务:不在新线程中执行任务,而是由调用者所在的线程来执行
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
// 关闭线程池是否等待任务完成
|
||||
executor.setWaitForTasksToCompleteOnShutdown(properties.isWaitForTasksToCompleteOnShutdown());
|
||||
// 执行器在关闭时阻塞的最长毫秒数,以等待剩余任务完成执行
|
||||
executor.setAwaitTerminationMillis(properties.getAwaitTerminationMillis());
|
||||
log.debug("[ContiNew Starter] - Auto Configuration 'ThreadPoolTaskExecutor' completed initialization.");
|
||||
return executor;
|
||||
}
|
||||
@@ -88,7 +97,62 @@ public class ThreadPoolAutoConfiguration {
|
||||
ExceptionUtils.printException(runnable, throwable);
|
||||
}
|
||||
};
|
||||
// 应用关闭时,关闭线程池
|
||||
SpringApplication.getShutdownHandlers().add(() -> shutdown(executor, properties));
|
||||
log.debug("[ContiNew Starter] - Auto Configuration 'ScheduledExecutorService' completed initialization.");
|
||||
return executor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据相应的配置设置关闭 ExecutorService
|
||||
*
|
||||
* @see org.springframework.scheduling.concurrent.ExecutorConfigurationSupport#shutdown()
|
||||
*/
|
||||
public void shutdown(ExecutorService executor, ThreadPoolProperties properties) {
|
||||
log.debug("[ContiNew Starter] - Shutting down ScheduledExecutorService start.");
|
||||
if (executor != null) {
|
||||
if (properties.isWaitForTasksToCompleteOnShutdown()) {
|
||||
executor.shutdown();
|
||||
} else {
|
||||
for (Runnable remainingTask : executor.shutdownNow()) {
|
||||
cancelRemainingTask(remainingTask);
|
||||
}
|
||||
}
|
||||
awaitTerminationIfNecessary(executor, properties);
|
||||
log.debug("[ContiNew Starter] - Shutting down ScheduledExecutorService complete.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel the given remaining task which never commenced execution,
|
||||
* as returned from {@link ExecutorService#shutdownNow()}.
|
||||
*
|
||||
* @param task the task to cancel (typically a {@link RunnableFuture})
|
||||
* @see RunnableFuture#cancel(boolean)
|
||||
*/
|
||||
protected void cancelRemainingTask(Runnable task) {
|
||||
if (task instanceof Future<?> future) {
|
||||
future.cancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wait for the executor to terminate, according to the value of the properties
|
||||
*/
|
||||
private void awaitTerminationIfNecessary(ExecutorService executor, ThreadPoolProperties properties) {
|
||||
if (properties.getAwaitTerminationMillis() > 0) {
|
||||
try {
|
||||
if (!executor.awaitTermination(properties.getAwaitTerminationMillis(), TimeUnit.MILLISECONDS)) {
|
||||
if (log.isWarnEnabled()) {
|
||||
log.warn("[ContiNew Starter] - Timed out while waiting for executor 'ScheduledExecutorService' to terminate.");
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException ex) {
|
||||
if (log.isWarnEnabled()) {
|
||||
log.warn("[ContiNew Starter] - Interrupted while waiting for executor 'ScheduledExecutorService' to terminate");
|
||||
}
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.autoconfigure.threadpool;
|
||||
package top.continew.starter.core.autoconfigure.threadpool;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
|
||||
/**
|
||||
* 线程池配置属性
|
||||
@@ -54,6 +54,16 @@ public class ThreadPoolProperties {
|
||||
*/
|
||||
private int keepAliveSeconds = 300;
|
||||
|
||||
/**
|
||||
* 关闭线程池是否等待任务完成
|
||||
*/
|
||||
private boolean waitForTasksToCompleteOnShutdown = false;
|
||||
|
||||
/**
|
||||
* 执行器在关闭时阻塞的最长毫秒数,以等待剩余任务完成执行
|
||||
*/
|
||||
private long awaitTerminationMillis = 0;
|
||||
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
@@ -93,4 +103,20 @@ public class ThreadPoolProperties {
|
||||
public void setKeepAliveSeconds(int keepAliveSeconds) {
|
||||
this.keepAliveSeconds = keepAliveSeconds;
|
||||
}
|
||||
|
||||
public boolean isWaitForTasksToCompleteOnShutdown() {
|
||||
return waitForTasksToCompleteOnShutdown;
|
||||
}
|
||||
|
||||
public void setWaitForTasksToCompleteOnShutdown(boolean waitForTasksToCompleteOnShutdown) {
|
||||
this.waitForTasksToCompleteOnShutdown = waitForTasksToCompleteOnShutdown;
|
||||
}
|
||||
|
||||
public long getAwaitTerminationMillis() {
|
||||
return awaitTerminationMillis;
|
||||
}
|
||||
|
||||
public void setAwaitTerminationMillis(long awaitTerminationMillis) {
|
||||
this.awaitTerminationMillis = awaitTerminationMillis;
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.constant;
|
||||
package top.continew.starter.core.constant;
|
||||
|
||||
/**
|
||||
* 配置属性相关常量
|
||||
@@ -37,7 +37,7 @@ public class PropertiesConstants {
|
||||
/**
|
||||
* 线程池配置
|
||||
*/
|
||||
public static final String THREAD_POOL = CONTINEW_STARTER + ".thread-pool";
|
||||
public static final String THREAD_POOL = CONTINEW_STARTER + StringConstants.DOT + "thread-pool";
|
||||
|
||||
/**
|
||||
* Spring Doc 配置
|
||||
@@ -47,7 +47,7 @@ public class PropertiesConstants {
|
||||
/**
|
||||
* Spring Doc Swagger UI 配置
|
||||
*/
|
||||
public static final String SPRINGDOC_SWAGGER_UI = SPRINGDOC + ".swagger-ui";
|
||||
public static final String SPRINGDOC_SWAGGER_UI = SPRINGDOC + StringConstants.DOT + "swagger-ui";
|
||||
|
||||
/**
|
||||
* 安全配置
|
||||
@@ -67,47 +67,52 @@ public class PropertiesConstants {
|
||||
/**
|
||||
* Web 配置
|
||||
*/
|
||||
public static final String WEB = CONTINEW_STARTER + ".web";
|
||||
public static final String WEB = CONTINEW_STARTER + StringConstants.DOT + "web";
|
||||
|
||||
/**
|
||||
* 跨域配置
|
||||
*/
|
||||
public static final String CORS = WEB + ".cors";
|
||||
public static final String CORS = WEB + StringConstants.DOT + "cors";
|
||||
|
||||
/**
|
||||
* 链路配置
|
||||
*/
|
||||
public static final String TRACE = WEB + ".trace";
|
||||
public static final String TRACE = WEB + StringConstants.DOT + "trace";
|
||||
|
||||
/**
|
||||
* XSS 配置
|
||||
*/
|
||||
public static final String XSS = WEB + StringConstants.DOT + "xss";
|
||||
|
||||
/**
|
||||
* 日志配置
|
||||
*/
|
||||
public static final String LOG = CONTINEW_STARTER + ".log";
|
||||
public static final String LOG = CONTINEW_STARTER + StringConstants.DOT + "log";
|
||||
|
||||
/**
|
||||
* 存储配置
|
||||
*/
|
||||
public static final String STORAGE = CONTINEW_STARTER + ".storage";
|
||||
public static final String STORAGE = CONTINEW_STARTER + StringConstants.DOT + "storage";
|
||||
|
||||
/**
|
||||
* 本地存储配置
|
||||
*/
|
||||
public static final String STORAGE_LOCAL = STORAGE + ".local";
|
||||
public static final String STORAGE_LOCAL = STORAGE + StringConstants.DOT + "local";
|
||||
|
||||
/**
|
||||
* 验证码配置
|
||||
*/
|
||||
public static final String CAPTCHA = CONTINEW_STARTER + ".captcha";
|
||||
public static final String CAPTCHA = CONTINEW_STARTER + StringConstants.DOT + "captcha";
|
||||
|
||||
/**
|
||||
* 图形验证码配置
|
||||
*/
|
||||
public static final String CAPTCHA_GRAPHIC = CAPTCHA + ".graphic";
|
||||
public static final String CAPTCHA_GRAPHIC = CAPTCHA + StringConstants.DOT + "graphic";
|
||||
|
||||
/**
|
||||
* 行为验证码配置
|
||||
*/
|
||||
public static final String CAPTCHA_BEHAVIOR = CAPTCHA + ".behavior";
|
||||
public static final String CAPTCHA_BEHAVIOR = CAPTCHA + StringConstants.DOT + "behavior";
|
||||
|
||||
private PropertiesConstants() {
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.constant;
|
||||
package top.continew.starter.core.constant;
|
||||
|
||||
import cn.hutool.core.text.CharPool;
|
||||
import cn.hutool.core.text.StrPool;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.exception;
|
||||
package top.continew.starter.core.exception;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.exception;
|
||||
package top.continew.starter.core.exception;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.exception;
|
||||
package top.continew.starter.core.exception;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.util;
|
||||
package top.continew.starter.core.util;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.TypeUtil;
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.util;
|
||||
package top.continew.starter.core.util;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
|
||||
import java.util.concurrent.CancellationException;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.util;
|
||||
package top.continew.starter.core.util;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import org.springframework.boot.env.YamlPropertySourceLoader;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.util;
|
||||
package top.continew.starter.core.util;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.net.NetUtil;
|
||||
@@ -23,7 +23,7 @@ import cn.hutool.extra.spring.SpringUtil;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import net.dreamlu.mica.ip2region.core.Ip2regionSearcher;
|
||||
import net.dreamlu.mica.ip2region.core.IpInfo;
|
||||
import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.util;
|
||||
package top.continew.starter.core.util;
|
||||
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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.core.util;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* 字符串工具类
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public class StrUtils {
|
||||
|
||||
private StrUtils() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果字符串是{@code null}或者""或者空白,则返回指定默认字符串,否则针对字符串处理后返回
|
||||
*
|
||||
* @param str 要转换的字符串
|
||||
* @param defaultValue 默认值
|
||||
* @param mapper 针对字符串的转换方法
|
||||
* @return 转换后的字符串或指定的默认字符串
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public static <T> T blankToDefault(CharSequence str, T defaultValue, Function<String, T> mapper) {
|
||||
return CharSequenceUtil.isBlank(str) ? defaultValue : mapper.apply(str.toString());
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.util;
|
||||
package top.continew.starter.core.util;
|
||||
|
||||
import cn.hutool.extra.template.Template;
|
||||
import cn.hutool.extra.template.TemplateConfig;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.util;
|
||||
package top.continew.starter.core.util;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.util.validate;
|
||||
package top.continew.starter.core.util.validate;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
import top.charles7c.continew.starter.core.exception.BusinessException;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.core.exception.BusinessException;
|
||||
|
||||
import java.util.function.BooleanSupplier;
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.util.validate;
|
||||
package top.continew.starter.core.util.validate;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import top.charles7c.continew.starter.core.exception.BadRequestException;
|
||||
import top.continew.starter.core.exception.BadRequestException;
|
||||
|
||||
import java.util.function.BooleanSupplier;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.core.util.validate;
|
||||
package top.continew.starter.core.util.validate;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
@@ -1,3 +1,3 @@
|
||||
top.charles7c.continew.starter.core.autoconfigure.project.ProjectAutoConfiguration
|
||||
top.charles7c.continew.starter.core.autoconfigure.threadpool.ThreadPoolAutoConfiguration
|
||||
top.charles7c.continew.starter.core.autoconfigure.threadpool.AsyncAutoConfiguration
|
||||
top.continew.starter.core.autoconfigure.project.ProjectAutoConfiguration
|
||||
top.continew.starter.core.autoconfigure.threadpool.ThreadPoolAutoConfiguration
|
||||
top.continew.starter.core.autoconfigure.threadpool.AsyncAutoConfiguration
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-data</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.core.annotation;
|
||||
package top.continew.starter.data.core.annotation;
|
||||
|
||||
import top.charles7c.continew.starter.data.core.enums.QueryType;
|
||||
import top.continew.starter.data.core.enums.QueryType;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.core.annotation;
|
||||
package top.continew.starter.data.core.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.core.enums;
|
||||
package top.continew.starter.data.core.enums;
|
||||
|
||||
import top.charles7c.continew.starter.data.core.function.ISqlFunction;
|
||||
import top.continew.starter.data.core.function.ISqlFunction;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.core.enums;
|
||||
package top.continew.starter.data.core.enums;
|
||||
|
||||
/**
|
||||
* 查询类型枚举
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.core.function;
|
||||
package top.continew.starter.data.core.function;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.core.util;
|
||||
package top.continew.starter.data.core.util;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
@@ -22,8 +22,8 @@ import cn.hutool.db.Db;
|
||||
import cn.hutool.db.Entity;
|
||||
import cn.hutool.db.meta.Column;
|
||||
import cn.hutool.db.meta.MetaUtil;
|
||||
import top.charles7c.continew.starter.core.exception.BusinessException;
|
||||
import top.charles7c.continew.starter.data.core.enums.DatabaseType;
|
||||
import top.continew.starter.core.exception.BusinessException;
|
||||
import top.continew.starter.data.core.enums.DatabaseType;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.Connection;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.core.util;
|
||||
package top.continew.starter.data.core.util;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-data</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<!-- 数据访问模块 - 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-data-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.autoconfigure;
|
||||
package top.continew.starter.data.mybatis.plus.autoconfigure;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.autoconfigure;
|
||||
package top.continew.starter.data.mybatis.plus.autoconfigure;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
import top.charles7c.continew.starter.data.mybatis.plus.autoconfigure.idgenerator.MyBatisPlusIdGeneratorProperties;
|
||||
import top.continew.starter.data.mybatis.plus.autoconfigure.idgenerator.MyBatisPlusIdGeneratorProperties;
|
||||
|
||||
/**
|
||||
* MyBatis Plus 扩展配置属性
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.autoconfigure;
|
||||
package top.continew.starter.data.mybatis.plus.autoconfigure;
|
||||
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
@@ -35,11 +35,11 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
import top.charles7c.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.charles7c.continew.starter.core.util.GeneralPropertySourceFactory;
|
||||
import top.charles7c.continew.starter.data.mybatis.plus.autoconfigure.idgenerator.MyBatisPlusIdGeneratorConfiguration;
|
||||
import top.charles7c.continew.starter.data.mybatis.plus.datapermission.DataPermissionFilter;
|
||||
import top.charles7c.continew.starter.data.mybatis.plus.datapermission.DataPermissionHandlerImpl;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.core.util.GeneralPropertySourceFactory;
|
||||
import top.continew.starter.data.mybatis.plus.autoconfigure.idgenerator.MyBatisPlusIdGeneratorConfiguration;
|
||||
import top.continew.starter.data.mybatis.plus.datapermission.DataPermissionFilter;
|
||||
import top.continew.starter.data.mybatis.plus.datapermission.DataPermissionHandlerImpl;
|
||||
|
||||
/**
|
||||
* MyBatis Plus 自动配置
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.autoconfigure.idgenerator;
|
||||
package top.continew.starter.data.mybatis.plus.autoconfigure.idgenerator;
|
||||
|
||||
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||
import me.ahoo.cosid.snowflake.SnowflakeId;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.autoconfigure.idgenerator;
|
||||
package top.continew.starter.data.mybatis.plus.autoconfigure.idgenerator;
|
||||
|
||||
import cn.hutool.core.net.NetUtil;
|
||||
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.autoconfigure.idgenerator;
|
||||
package top.continew.starter.data.mybatis.plus.autoconfigure.idgenerator;
|
||||
|
||||
import top.charles7c.continew.starter.data.mybatis.plus.enums.MyBatisPlusIdGeneratorType;
|
||||
import top.continew.starter.data.mybatis.plus.enums.MyBatisPlusIdGeneratorType;
|
||||
|
||||
/**
|
||||
* MyBatis ID 生成器配置属性
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.base;
|
||||
package top.continew.starter.data.mybatis.plus.base;
|
||||
|
||||
import cn.hutool.core.util.ClassUtil;
|
||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.base;
|
||||
package top.continew.starter.data.mybatis.plus.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.datapermission;
|
||||
package top.continew.starter.data.mybatis.plus.datapermission;
|
||||
|
||||
import org.springframework.core.annotation.AliasFor;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.datapermission;
|
||||
package top.continew.starter.data.mybatis.plus.datapermission;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.datapermission;
|
||||
package top.continew.starter.data.mybatis.plus.datapermission;
|
||||
|
||||
/**
|
||||
* 数据权限过滤器接口
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.datapermission;
|
||||
package top.continew.starter.data.mybatis.plus.datapermission;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
@@ -35,7 +35,7 @@ import net.sf.jsqlparser.statement.select.SelectExpressionItem;
|
||||
import net.sf.jsqlparser.statement.select.SubSelect;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Collections;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.datapermission;
|
||||
package top.continew.starter.data.mybatis.plus.datapermission;
|
||||
|
||||
/**
|
||||
* 数据权限枚举
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.enums;
|
||||
package top.continew.starter.data.mybatis.plus.enums;
|
||||
|
||||
/**
|
||||
* MyBatis ID 生成器类型枚举
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.query;
|
||||
package top.continew.starter.data.mybatis.plus.query;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -23,12 +23,12 @@ import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import top.charles7c.continew.starter.core.exception.BadRequestException;
|
||||
import top.charles7c.continew.starter.core.util.ReflectUtils;
|
||||
import top.charles7c.continew.starter.core.util.validate.ValidationUtils;
|
||||
import top.charles7c.continew.starter.data.core.annotation.Query;
|
||||
import top.charles7c.continew.starter.data.core.annotation.QueryIgnore;
|
||||
import top.charles7c.continew.starter.data.core.enums.QueryType;
|
||||
import top.continew.starter.core.exception.BadRequestException;
|
||||
import top.continew.starter.core.util.ReflectUtils;
|
||||
import top.continew.starter.core.util.validate.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 java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.service;
|
||||
package top.continew.starter.data.mybatis.plus.service;
|
||||
|
||||
/**
|
||||
* 通用业务接口
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.starter.data.mybatis.plus.service.impl;
|
||||
package top.continew.starter.data.mybatis.plus.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ClassUtil;
|
||||
import top.charles7c.continew.starter.core.util.ReflectUtils;
|
||||
import top.charles7c.continew.starter.core.util.validate.CheckUtils;
|
||||
import top.charles7c.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
import top.charles7c.continew.starter.data.mybatis.plus.service.IService;
|
||||
import top.continew.starter.core.util.ReflectUtils;
|
||||
import top.continew.starter.core.util.validate.CheckUtils;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
import top.continew.starter.data.mybatis.plus.service.IService;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Field;
|
||||
@@ -1 +1 @@
|
||||
top.charles7c.continew.starter.data.mybatis.plus.autoconfigure.MybatisPlusAutoConfiguration
|
||||
top.continew.starter.data.mybatis.plus.autoconfigure.MybatisPlusAutoConfiguration
|
||||
@@ -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.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -21,7 +21,7 @@
|
||||
<dependencies>
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>3.1.9</version>
|
||||
<version>3.1.11</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-dependencies</artifactId>
|
||||
<version>${revision}</version>
|
||||
<packaging>pom</packaging>
|
||||
@@ -19,7 +19,7 @@
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
||||
<url>http://www.gnu.org/licenses/lgpl.html</url>
|
||||
<url>https://www.gnu.org/licenses/lgpl.html</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
@@ -34,47 +34,39 @@
|
||||
<timezone>+8</timezone>
|
||||
<url>https://github.com/Charles7c</url>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>bull-bcls</id>
|
||||
<name>Bull-BCLS</name>
|
||||
<email>Tomcat416@163.com</email>
|
||||
<roles>
|
||||
<role>Java Development Engineer</role>
|
||||
</roles>
|
||||
<timezone>+8</timezone>
|
||||
<url>https://github.com/Bull-BCLS</url>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<url>https://github.com/Charles7c/continew-starter</url>
|
||||
<connection>scm:git:git@github.com:Charles7c/continew-starter.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:Charles7c/continew-starter.git</developerConnection>
|
||||
<url>https://github.com/Charles7c/continew-starter</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<!-- 项目版本号 -->
|
||||
<revision>1.5.0</revision>
|
||||
<sa-token.version>1.37.0</sa-token.version>
|
||||
<revision>2.0.2</revision>
|
||||
<sa-token.version>1.38.0</sa-token.version>
|
||||
<just-auth.version>1.16.6</just-auth.version>
|
||||
<mybatis-plus.version>3.5.5</mybatis-plus.version>
|
||||
<dynamic-datasource.version>4.3.0</dynamic-datasource.version>
|
||||
<p6spy.version>3.9.1</p6spy.version>
|
||||
<jetcache.version>2.7.5</jetcache.version>
|
||||
<redisson.version>3.27.1</redisson.version>
|
||||
<cosid.version>2.6.6</cosid.version>
|
||||
<sms4j.version>3.1.1</sms4j.version>
|
||||
<redisson.version>3.30.0</redisson.version>
|
||||
<cosid.version>2.6.8</cosid.version>
|
||||
<sms4j.version>3.2.1</sms4j.version>
|
||||
<aj-captcha.version>1.3.0</aj-captcha.version>
|
||||
<easy-captcha.version>1.6.2</easy-captcha.version>
|
||||
<easy-excel.version>3.3.3</easy-excel.version>
|
||||
<easy-excel.version>3.3.4</easy-excel.version>
|
||||
<nashorn.version>15.4</nashorn.version>
|
||||
<x-file-storage.version>2.1.0</x-file-storage.version>
|
||||
<aws-s3.version>1.12.675</aws-s3.version>
|
||||
<crane4j.version>2.6.0</crane4j.version>
|
||||
<aws-s3.version>1.12.720</aws-s3.version>
|
||||
<crane4j.version>2.8.0</crane4j.version>
|
||||
<knife4j.version>4.5.0</knife4j.version>
|
||||
<tlog.version>1.5.1</tlog.version>
|
||||
<tlog.version>1.5.2</tlog.version>
|
||||
<snakeyaml.version>2.2</snakeyaml.version>
|
||||
<okhttp.version>4.12.0</okhttp.version>
|
||||
<ttl.version>2.14.5</ttl.version>
|
||||
<ip2region.version>3.1.9</ip2region.version>
|
||||
<hutool.version>5.8.26</hutool.version>
|
||||
<ip2region.version>3.1.11</ip2region.version>
|
||||
<hutool.version>5.8.27</hutool.version>
|
||||
<!-- Maven Plugin Versions -->
|
||||
<flatten.version>1.6.0</flatten.version>
|
||||
<spotless.version>2.43.0</spotless.version>
|
||||
@@ -264,6 +256,20 @@
|
||||
<version>${tlog.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SnakeYAML(适用于 Java 的 YAML 1.1 解析器和发射器) -->
|
||||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>${snakeyaml.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- OkHTTP(一个默认高效的 HTTP 客户端) -->
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>${okhttp.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- TTL(线程间传递 ThreadLocal,异步执行时上下文传递的解决方案) -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
@@ -295,171 +301,158 @@
|
||||
<!-- ContiNew Starter 依赖 -->
|
||||
<!-- 扩展模块 - CRUD -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-extension-crud</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 认证模块 - JustAuth -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-auth-justauth</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 认证模块 - SaToken -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-auth-satoken</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 数据访问模块 - MyBatis Plus -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-data-mybatis-plus</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 数据访问模块 - 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-data-core</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 缓存模块 - JetCache -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-cache-jetcache</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 缓存模块 - Spring Cache -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-cache-springcache</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 缓存模块 - Redisson -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-cache-redisson</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 消息模块 - SMS -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<artifactId>continew-starter-messaging-sms</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 消息模块 - 邮件 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-messaging-mail</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 验证码模块 - 行为验证码 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-captcha-behavior</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 验证码模块 - 图形验证码 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-captcha-graphic</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 文件处理模块 - Excel -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-file-excel</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 存储模块 - 本地存储 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-storage-local</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 日志模块 - HttpTracePro(Spring Boot Actuator HttpTrace 定制增强版) -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-log-httptrace-pro</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 日志模块 - 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-log-core</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-web</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 安全模块 - 统一模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<artifactId>continew-starter-security-all</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 安全模块 - 加密 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-security-crypto</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 安全模块 - 脱敏 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-security-mask</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 安全模块 - 密码编码器 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-security-password</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- API 文档模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-api-doc</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON 模块 - Jackson -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-json-jackson</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-core</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
@@ -662,20 +655,18 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.central</groupId>
|
||||
<artifactId>central-publishing-maven-plugin</artifactId>
|
||||
<version>0.4.0</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<publishingServerId>central</publishingServerId>
|
||||
<tokenAuth>true</tokenAuth>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>sonatype-nexus-snapshots</id>
|
||||
<name>Sonatype Nexus Snapshots</name>
|
||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>sonatype-nexus-staging</id>
|
||||
<name>Nexus Release Repository</name>
|
||||
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
<!-- Sonar 代码质量分析 -->
|
||||
<profile>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user