mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-11-14 03:01:38 +08:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 07d9fdf3e2 | |||
| 6e73472589 | |||
| 6c10e80d71 | |||
| a208fa59b2 | |||
| 92fd0a8ab2 | |||
|
|
1bc4ba76b2 | ||
| ca1dd8fd43 | |||
| ed2e3762b6 | |||
| 0bba30b9c4 | |||
| 332ef45c4a | |||
| 27b949dd9d | |||
| c84539b461 | |||
| 91cd4d4d22 | |||
|
|
a235a6ea8b |
28
.github/workflows/build.yml
vendored
Normal file
28
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
jdk-version:
|
||||||
|
- 17
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: "adopt"
|
||||||
|
java-version: ${{ matrix.jdk-version }}
|
||||||
|
cache: "maven"
|
||||||
|
- name: Compile
|
||||||
|
run: |
|
||||||
|
sed -i.bak '/<repositories>/,/<\/repositories>/d' pom.xml
|
||||||
|
sed -i.bak '/<pluginRepositories>/,/<\/pluginRepositories>/d' pom.xml
|
||||||
|
mvn -B compile --file pom.xml
|
||||||
2
.github/workflows/release-tag.yml
vendored
2
.github/workflows/release-tag.yml
vendored
@@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
if: github.repository == 'Charles7c/continew-starter'
|
if: github.repository == 'continew-org/continew-starter'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|||||||
@@ -1,26 +1,31 @@
|
|||||||
name: Analysis Code Quality
|
name: Scan
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# 推送时执行
|
|
||||||
push:
|
push:
|
||||||
branches: [dev]
|
branches:
|
||||||
# 可手动执行
|
- dev
|
||||||
workflow_dispatch:
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Sonar 扫描
|
|
||||||
sonar-scan:
|
sonar-scan:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
jdk-version:
|
||||||
|
- 17
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@master
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt'
|
distribution: "adopt"
|
||||||
java-version: 17
|
java-version: ${{ matrix.jdk-version }}
|
||||||
|
cache: "maven"
|
||||||
- name: Cache SonarCloud packages
|
- name: Cache SonarCloud packages
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
@@ -34,7 +39,10 @@ jobs:
|
|||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||||
restore-keys: ${{ runner.os }}-m2
|
restore-keys: ${{ runner.os }}-m2
|
||||||
- name: Analyze
|
- name: Analyze
|
||||||
run: mvn -B verify -Psonar
|
run: |
|
||||||
|
sed -i.bak '/<repositories>/,/<\/repositories>/d' pom.xml
|
||||||
|
sed -i.bak '/<pluginRepositories>/,/<\/pluginRepositories>/d' pom.xml
|
||||||
|
mvn -B verify -Psonar
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
BIN
.idea/icon.png
generated
BIN
.idea/icon.png
generated
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
350
CHANGELOG.md
350
CHANGELOG.md
@@ -1,319 +1,339 @@
|
|||||||
## [v2.1.0](https://github.com/Charles7c/continew-starter/compare/v2.0.2...v2.1.0) (2024-06-05)
|
## [v2.1.1](https://github.com/continew-org/continew-starter/compare/v2.1.0...v2.1.1) (2024-06-23)
|
||||||
|
|
||||||
### ✨ 新特性
|
### ✨ 新特性
|
||||||
|
|
||||||
- 【messaging/mail】新增动态邮箱配置 ([Gitee#19](https://gitee.com/continew/continew-starter/pulls/19)) ([ee30e86](https://github.com/Charles7c/continew-starter/commit/ee30e861ff536ee3ed6f14ff5ded5af7a513941d)) ([7feda79](https://github.com/Charles7c/continew-starter/commit/7feda79359ea40331eee1e3d4d5fd12000f027c5))
|
- 【data/mybatis-plus】新增防全表更新与删除插件启用配置 ([c84539b](https://github.com/continew-org/continew-starter/commit/c84539b4619d2064c8996cd3e574fa5141e124da))
|
||||||
- 【data/mybatis-flex】新增 continew-starter-data-mybatis-flex 数据访问模块(Mybatis Flex 自动配置) ([Gitee#18](https://gitee.com/continew/continew-starter/pulls/18)) ([124c7ff](https://github.com/Charles7c/continew-starter/commit/124c7ffe11a0e6563d9b513036c53ff66edbb9b3))
|
- 【messaging/mail】邮件支持自定义发件人 ([27b949d](https://github.com/continew-org/continew-starter/commit/27b949dd9d62f68c74d8a12729c4de5fdcc414c9))
|
||||||
- 【extension/crud】新增查询字典列表方法 ([3d2a427](https://github.com/Charles7c/continew-starter/commit/3d2a4271d5eed676f16f4728b461dc3b298a65a9))
|
- 【cache/redisson】RedisUtils 新增 List 缓存操作方法 ([92fd0a8](https://github.com/continew-org/continew-starter/commit/92fd0a8ab2c0250981aceb006a86c1e911719970))
|
||||||
- 【messaging/websocket】新增 continew-starter-messaging-websocket 消息模块 ([cc079e8](https://github.com/Charles7c/continew-starter/commit/cc079e8bf422825bf9a96ddbd4329fc77d3cbf2c))
|
|
||||||
|
|
||||||
## [v2.0.2](https://github.com/Charles7c/continew-starter/compare/v2.0.1...v2.0.2) (2024-05-20)
|
### 🐛 问题修复
|
||||||
|
|
||||||
|
- 【security/crypto】修复处理 MP Wrapper 时 无法加密的情况 (GitHub#4) ([a235a6e](https://github.com/continew-org/continew-starter/commit/a235a6ea8b574c3f719857bb99d05e874d4e9bd2))
|
||||||
|
- 【log/core】兼容日志记录 IPv6 IP 归属地场景 ([0bba30b](https://github.com/continew-org/continew-starter/commit/0bba30b9c4c14e5582b034420f47d0567fdc482a))
|
||||||
|
- 【extension/crud】排除 SaToken Starter 中的 Web 依赖 ([6e73472](https://github.com/continew-org/continew-starter/commit/6e73472589f65d63ef5d397e681f5af6b31b43c6))
|
||||||
|
|
||||||
|
### 💎 功能优化
|
||||||
|
|
||||||
|
- 【web】优化全局文件上传异常-超过上传大小限制的异常判断 ([1bc4ba7](https://github.com/continew-org/continew-starter/commit/1bc4ba76b20f06b2932c1bc20948a6d88d40ab2b))
|
||||||
|
- 【core】线程池配置增加默认线程前缀配置 ([a208fa5](https://github.com/continew-org/continew-starter/commit/a208fa59b2a9457bced4dfd3b24f92ce4a73f1f6))
|
||||||
|
- 【messaging/websocket】优化 WebSocket 相关配置及命名 ([6c10e80](https://github.com/continew-org/continew-starter/commit/6c10e80d71a7ce768d4fd44006c707c599b3960e))
|
||||||
|
|
||||||
|
## [v2.1.0](https://github.com/continew-org/continew-starter/compare/v2.0.2...v2.1.0) (2024-06-05)
|
||||||
|
|
||||||
### ✨ 新特性
|
### ✨ 新特性
|
||||||
|
|
||||||
- 【file/excel】新增 Easy Excel List 集合转换器 ([1faa46e](https://github.com/Charles7c/continew-starter/commit/1faa46e12505c025e5ca6f1a45158324ac210799))
|
- 【messaging/mail】新增动态邮箱配置 ([Gitee#19](https://gitee.com/continew/continew-starter/pulls/19)) ([ee30e86](https://github.com/continew-org/continew-starter/commit/ee30e861ff536ee3ed6f14ff5ded5af7a513941d)) ([7feda79](https://github.com/continew-org/continew-starter/commit/7feda79359ea40331eee1e3d4d5fd12000f027c5))
|
||||||
|
- 【data/mybatis-flex】新增 continew-starter-data-mybatis-flex 数据访问模块(Mybatis Flex 自动配置) ([Gitee#18](https://gitee.com/continew/continew-starter/pulls/18)) ([124c7ff](https://github.com/continew-org/continew-starter/commit/124c7ffe11a0e6563d9b513036c53ff66edbb9b3))
|
||||||
|
- 【extension/crud】新增查询字典列表方法 ([3d2a427](https://github.com/continew-org/continew-starter/commit/3d2a4271d5eed676f16f4728b461dc3b298a65a9))
|
||||||
|
- 【messaging/websocket】新增 continew-starter-messaging-websocket 消息模块 ([cc079e8](https://github.com/continew-org/continew-starter/commit/cc079e8bf422825bf9a96ddbd4329fc77d3cbf2c))
|
||||||
|
|
||||||
|
## [v2.0.2](https://github.com/continew-org/continew-starter/compare/v2.0.1...v2.0.2) (2024-05-20)
|
||||||
|
|
||||||
|
### ✨ 新特性
|
||||||
|
|
||||||
|
- 【file/excel】新增 Easy Excel List 集合转换器 ([1faa46e](https://github.com/continew-org/continew-starter/commit/1faa46e12505c025e5ca6f1a45158324ac210799))
|
||||||
|
|
||||||
### 🐛 问题修复
|
### 🐛 问题修复
|
||||||
|
|
||||||
- 【captcha/behavior】修复行为验证码接口请求次数限制 ([Gitee#17](https://gitee.com/continew/continew-starter/pulls/17))
|
- 【captcha/behavior】修复行为验证码接口请求次数限制 ([Gitee#17](https://gitee.com/continew/continew-starter/pulls/17))
|
||||||
- 【extension/crud】修复封装分页 dataList 索引计算错误 ([3e60197](https://github.com/Charles7c/continew-starter/commit/3e60197a31f140c863868440944df0427a9cf8e8))
|
- 【extension/crud】修复封装分页 dataList 索引计算错误 ([3e60197](https://github.com/continew-org/continew-starter/commit/3e60197a31f140c863868440944df0427a9cf8e8))
|
||||||
- 移除部分错误依赖声明 ([881fd37](https://github.com/Charles7c/continew-starter/commit/881fd37dd61836daf3343d9053e9a7c81b005923))
|
- 移除部分错误依赖声明 ([881fd37](https://github.com/continew-org/continew-starter/commit/881fd37dd61836daf3343d9053e9a7c81b005923))
|
||||||
|
|
||||||
## [v2.0.1](https://github.com/Charles7c/continew-starter/compare/v2.0.0...v2.0.1) (2024-05-13)
|
## [v2.0.1](https://github.com/continew-org/continew-starter/compare/v2.0.0...v2.0.1) (2024-05-13)
|
||||||
|
|
||||||
### ✨ 新特性
|
### ✨ 新特性
|
||||||
|
|
||||||
- 【cache/redisson】RedisUtils 新增递增、递减方法 ([596605b](https://github.com/Charles7c/continew-starter/commit/596605b27b046fa0488b113b1c3d87c60277e4ec))
|
- 【cache/redisson】RedisUtils 新增递增、递减方法 ([596605b](https://github.com/continew-org/continew-starter/commit/596605b27b046fa0488b113b1c3d87c60277e4ec))
|
||||||
- 【core】新增字符串工具类 ([ca6c709](https://github.com/Charles7c/continew-starter/commit/ca6c7098b124c3121fe626811ea61d53c80a9a4e))
|
- 【core】新增字符串工具类 ([ca6c709](https://github.com/continew-org/continew-starter/commit/ca6c7098b124c3121fe626811ea61d53c80a9a4e))
|
||||||
- 【extension/crud】新增多种实体 Base 模型降低 BaseService 耦合 ([5b76534](https://github.com/Charles7c/continew-starter/commit/5b76534df7a54aa6d696515cfbf8059fcdc4a067))
|
- 【extension/crud】新增多种实体 Base 模型降低 BaseService 耦合 ([5b76534](https://github.com/continew-org/continew-starter/commit/5b76534df7a54aa6d696515cfbf8059fcdc4a067))
|
||||||
|
|
||||||
### 🐛 问题修复
|
### 🐛 问题修复
|
||||||
|
|
||||||
- 【extension/crud】修复查询树列表方法中的错误判断 ([f138e5c](https://github.com/Charles7c/continew-starter/commit/f138e5cd4526d8be0fe5e7ae54833b4541748346))
|
- 【extension/crud】修复查询树列表方法中的错误判断 ([f138e5c](https://github.com/continew-org/continew-starter/commit/f138e5cd4526d8be0fe5e7ae54833b4541748346))
|
||||||
|
|
||||||
### 💎 功能优化
|
### 💎 功能优化
|
||||||
|
|
||||||
- 【web】优化部分方法使用 ([57eef27](https://github.com/Charles7c/continew-starter/commit/57eef274a3e34e8bb4de6073452080b2bbdbee53))
|
- 【web】优化部分方法使用 ([57eef27](https://github.com/continew-org/continew-starter/commit/57eef274a3e34e8bb4de6073452080b2bbdbee53))
|
||||||
|
|
||||||
### 📦 依赖升级
|
### 📦 依赖升级
|
||||||
|
|
||||||
- 【dependencies】Spring Boot 3.1.10 => 3.1.11 ([GitHub#2](https://github.com/Charles7c/continew-starter/pull/2))
|
- 【dependencies】Spring Boot 3.1.10 => 3.1.11 ([GitHub#2](https://github.com/continew-org/continew-starter/pull/2))
|
||||||
- 【dependencies】SaToken 1.37.0 => 1.38.0 ([b5dd5c7](https://github.com/Charles7c/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
- 【dependencies】SaToken 1.37.0 => 1.38.0 ([b5dd5c7](https://github.com/continew-org/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
||||||
- 【dependencies】Redisson 3.28.0 => 3.30.0 ([b5dd5c7](https://github.com/Charles7c/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
- 【dependencies】Redisson 3.28.0 => 3.30.0 ([b5dd5c7](https://github.com/continew-org/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
||||||
- 【dependencies】Crane4j 2.7.0 => 2.8.0 ([b5dd5c7](https://github.com/Charles7c/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
- 【dependencies】Crane4j 2.7.0 => 2.8.0 ([b5dd5c7](https://github.com/continew-org/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
||||||
- 【dependencies】AWS S3 1.12.702 => 1.12.720 ([b5dd5c7](https://github.com/Charles7c/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
- 【dependencies】AWS S3 1.12.702 => 1.12.720 ([b5dd5c7](https://github.com/continew-org/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
||||||
- 【dependencies】IP2Region 3.1.10 => 3.1.11 ([b5dd5c7](https://github.com/Charles7c/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
- 【dependencies】IP2Region 3.1.10 => 3.1.11 ([b5dd5c7](https://github.com/continew-org/continew-starter/commit/b5dd5c7f18603b5bd5a509c04ef410c1d64bc2e9))
|
||||||
|
|
||||||
## [v2.0.0](https://github.com/Charles7c/continew-starter/compare/v1.5.1...v2.0.0) (2024-04-17)
|
## [v2.0.0](https://github.com/continew-org/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))
|
- 【web】新增 XSS 过滤器 ([2656da4](https://github.com/continew-org/continew-starter/commit/2656da450c866681c270c30131c028847e1e21d4)) ([2573fb0](https://github.com/continew-org/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))
|
- 【cache/redisson】修复Failed to submit a listener notification task. Event loop shut down? 问题 ([2d71eca](https://github.com/continew-org/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||||
|
|
||||||
### 💎 功能优化
|
### 💎 功能优化
|
||||||
|
|
||||||
- 【core】应用关闭,支持优雅关闭自定义线程池 ScheduledExecutorService ([c4051a6](https://github.com/Charles7c/continew-starter/commit/c4051a6465e0d70d119ec27c6ae4eb4d1893339a))
|
- 【core】应用关闭,支持优雅关闭自定义线程池 ScheduledExecutorService ([c4051a6](https://github.com/continew-org/continew-starter/commit/c4051a6465e0d70d119ec27c6ae4eb4d1893339a))
|
||||||
- 【extension/crud】优化部分注释 ([fe310bc](https://github.com/Charles7c/continew-starter/commit/fe310bcb879d3f20eb8ead4b39436ec96b99e7f6))
|
- 【extension/crud】优化部分注释 ([fe310bc](https://github.com/continew-org/continew-starter/commit/fe310bcb879d3f20eb8ead4b39436ec96b99e7f6))
|
||||||
- 移除 Qodana 扫描,License 已过期 ([b0e567d](https://github.com/Charles7c/continew-starter/commit/b0e567d749b988e3f45772742a273a422a661edb))
|
- 移除 Qodana 扫描,License 已过期 ([b0e567d](https://github.com/continew-org/continew-starter/commit/b0e567d749b988e3f45772742a273a422a661edb))
|
||||||
|
|
||||||
### 📦 依赖升级
|
### 📦 依赖升级
|
||||||
|
|
||||||
- 【dependencies】Spring Boot 3.1.9 => 3.1.10 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
- 【dependencies】Spring Boot 3.1.9 => 3.1.10 ([2d71eca](https://github.com/continew-org/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||||
- 【dependencies】Redisson 3.27.2 => 3.28.0 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
- 【dependencies】Redisson 3.27.2 => 3.28.0 ([2d71eca](https://github.com/continew-org/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||||
- 【dependencies】CosId 2.6.6 => 2.6.8 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
- 【dependencies】CosId 2.6.6 => 2.6.8 ([2d71eca](https://github.com/continew-org/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||||
- 【dependencies】SMS4J 3.1.1 => 3.2.1 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
- 【dependencies】SMS4J 3.1.1 => 3.2.1 ([2d71eca](https://github.com/continew-org/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||||
- 【dependencies】Easy Excel 3.3.3 => 3.3.4 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
- 【dependencies】Easy Excel 3.3.3 => 3.3.4 ([2d71eca](https://github.com/continew-org/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||||
- 【dependencies】AWS S3 1.12.675 => 1.12.702 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
- 【dependencies】AWS S3 1.12.675 => 1.12.702 ([2d71eca](https://github.com/continew-org/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||||
- 【dependencies】Crane4j 2.6.1 => 2.7.0 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
- 【dependencies】Crane4j 2.6.1 => 2.7.0 ([2d71eca](https://github.com/continew-org/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||||
- 【dependencies】TLog 1.5.1 => 1.5.2 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
- 【dependencies】TLog 1.5.1 => 1.5.2 ([2d71eca](https://github.com/continew-org/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||||
- 【dependencies】Hutool 5.8.26 => 5.8.27 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
- 【dependencies】Hutool 5.8.26 => 5.8.27 ([2d71eca](https://github.com/continew-org/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||||
- 【dependencies】IP2Region 3.1.9 => 3.1.10 ([2d71eca](https://github.com/Charles7c/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
- 【dependencies】IP2Region 3.1.9 => 3.1.10 ([2d71eca](https://github.com/continew-org/continew-starter/commit/2d71eca07505f143c82cca8d24bc6f54105d0bbb))
|
||||||
|
|
||||||
### 💥 破坏性变更
|
### 💥 破坏性变更
|
||||||
|
|
||||||
- groupId 及基础包名调整,更短的包名,聚合品牌形象。top.charles7c.continew => top.continew ([dbb7a63](https://github.com/Charles7c/continew-starter/commit/dbb7a6319e9440e7a05f2eb4aab3b445f43197f7))
|
- groupId 及基础包名调整,更短的包名,聚合品牌形象。top.charles7c.continew => top.continew ([dbb7a63](https://github.com/continew-org/continew-starter/commit/dbb7a6319e9440e7a05f2eb4aab3b445f43197f7))
|
||||||
|
|
||||||
## [v1.5.1](https://github.com/Charles7c/continew-starter/compare/v1.5.0...v1.5.1) (2024-03-23)
|
## [v1.5.1](https://github.com/continew-org/continew-starter/compare/v1.5.0...v1.5.1) (2024-03-23)
|
||||||
|
|
||||||
### ✨ 新特性
|
### ✨ 新特性
|
||||||
|
|
||||||
- 【web】FileUploadUtils 新增文件下载方法 ([171040b](https://github.com/Charles7c/continew-starter/commit/171040b674ae18dd6560f1501f7c0d47a1f4b8ba))
|
- 【web】FileUploadUtils 新增文件下载方法 ([171040b](https://github.com/continew-org/continew-starter/commit/171040b674ae18dd6560f1501f7c0d47a1f4b8ba))
|
||||||
|
|
||||||
### 🐛 问题修复
|
### 🐛 问题修复
|
||||||
|
|
||||||
- 【api-doc】修复接口级鉴权配置不生效的问题 ([ab4a72e](https://github.com/Charles7c/continew-starter/commit/ab4a72e0fffe20b492c2250cc997ba3e94794118))
|
- 【api-doc】修复接口级鉴权配置不生效的问题 ([ab4a72e](https://github.com/continew-org/continew-starter/commit/ab4a72e0fffe20b492c2250cc997ba3e94794118))
|
||||||
|
|
||||||
### 📦 依赖升级
|
### 📦 依赖升级
|
||||||
|
|
||||||
- 【dependencies】Redisson 3.27.1 => 3.27.2 ([0f43e1c](https://github.com/Charles7c/continew-starter/commit/0f43e1cff7f2fc58273de300acf4432f3a300af4))
|
- 【dependencies】Redisson 3.27.1 => 3.27.2 ([0f43e1c](https://github.com/continew-org/continew-starter/commit/0f43e1cff7f2fc58273de300acf4432f3a300af4))
|
||||||
- 【dependencies】Crane4j 2.6.0 => 2.6.1 ([0f43e1c](https://github.com/Charles7c/continew-starter/commit/0f43e1cff7f2fc58273de300acf4432f3a300af4))
|
- 【dependencies】Crane4j 2.6.0 => 2.6.1 ([0f43e1c](https://github.com/continew-org/continew-starter/commit/0f43e1cff7f2fc58273de300acf4432f3a300af4))
|
||||||
|
|
||||||
## [v1.5.0](https://github.com/Charles7c/continew-starter/compare/v1.4.1...v1.5.0) (2024-03-08)
|
## [v1.5.0](https://github.com/continew-org/continew-starter/compare/v1.4.1...v1.5.0) (2024-03-08)
|
||||||
|
|
||||||
### 💎 功能优化
|
### 💎 功能优化
|
||||||
|
|
||||||
- 【data/mybatis-plus】重构 IService 及 BaseService 体系结构 ([36ce07b](https://github.com/Charles7c/continew-starter/commit/36ce07b600fc54eeca3682d09aa5992cb2b35c17))
|
- 【data/mybatis-plus】重构 IService 及 BaseService 体系结构 ([36ce07b](https://github.com/continew-org/continew-starter/commit/36ce07b600fc54eeca3682d09aa5992cb2b35c17))
|
||||||
- 【json/jackson】优化 Jackson 默认配置 ([a54294d](https://github.com/Charles7c/continew-starter/commit/a54294df6e24dc36d36cf6a94559af2ed4c32d44))
|
- 【json/jackson】优化 Jackson 默认配置 ([a54294d](https://github.com/continew-org/continew-starter/commit/a54294df6e24dc36d36cf6a94559af2ed4c32d44))
|
||||||
- 【extension/crud】调整 BaseController checkPermission 方法的访问修饰符 private => protected ([12bdf3e](https://github.com/Charles7c/continew-starter/commit/12bdf3e44a10e9683b8605642eac9c463c590af4))
|
- 【extension/crud】调整 BaseController checkPermission 方法的访问修饰符 private => protected ([12bdf3e](https://github.com/continew-org/continew-starter/commit/12bdf3e44a10e9683b8605642eac9c463c590af4))
|
||||||
|
|
||||||
### 📦 依赖升级
|
### 📦 依赖升级
|
||||||
|
|
||||||
- 【dependencies】Spring Boot 3.1.8 => 3.1.9 ([98261b9](https://github.com/Charles7c/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
- 【dependencies】Spring Boot 3.1.8 => 3.1.9 ([98261b9](https://github.com/continew-org/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
||||||
- 【dependencies】Redisson 3.26.0 => 3.27.1 ([98261b9](https://github.com/Charles7c/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
- 【dependencies】Redisson 3.26.0 => 3.27.1 ([98261b9](https://github.com/continew-org/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
||||||
- 【dependencies】Crane4j 2.5.0 => 2.6.0 ([98261b9](https://github.com/Charles7c/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
- 【dependencies】Crane4j 2.5.0 => 2.6.0 ([98261b9](https://github.com/continew-org/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
||||||
- 【dependencies】Hutool 5.8.25 => 5.8.26 ([98261b9](https://github.com/Charles7c/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
- 【dependencies】Hutool 5.8.25 => 5.8.26 ([98261b9](https://github.com/continew-org/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
||||||
- 【dependencies】CosId 2.6.5 => 2.6.6 ([98261b9](https://github.com/Charles7c/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
- 【dependencies】CosId 2.6.5 => 2.6.6 ([98261b9](https://github.com/continew-org/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
||||||
- 【dependencies】Amazon S3 1.12.651 => 1.12.675 ([98261b9](https://github.com/Charles7c/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
- 【dependencies】Amazon S3 1.12.651 => 1.12.675 ([98261b9](https://github.com/continew-org/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
||||||
- 【dependencies】Ip2region 3.1.7 => 3.1.9 ([98261b9](https://github.com/Charles7c/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
- 【dependencies】Ip2region 3.1.7 => 3.1.9 ([98261b9](https://github.com/continew-org/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
||||||
- 【dependencies】TTL 2.14.4 => 2.14.5 ([98261b9](https://github.com/Charles7c/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
- 【dependencies】TTL 2.14.4 => 2.14.5 ([98261b9](https://github.com/continew-org/continew-starter/commit/98261b96dacdba9d210790112248d798e292ae0b))
|
||||||
|
|
||||||
## [v1.4.1](https://github.com/Charles7c/continew-starter/compare/v1.4.0...v1.4.1) (2024-02-21)
|
## [v1.4.1](https://github.com/continew-org/continew-starter/compare/v1.4.0...v1.4.1) (2024-02-21)
|
||||||
|
|
||||||
### ✨ 新特性
|
### ✨ 新特性
|
||||||
|
|
||||||
- 【data/core】新增 continew-starter-data-core 模块 ([4ffc5dc](https://github.com/Charles7c/continew-starter/commit/4ffc5dc1d4cdbb572070312eef172a197e216318))
|
- 【data/core】新增 continew-starter-data-core 模块 ([4ffc5dc](https://github.com/continew-org/continew-starter/commit/4ffc5dc1d4cdbb572070312eef172a197e216318))
|
||||||
- 【data/core】新增获取数据库类型带默认类型方法 ([31ca1fd](https://github.com/Charles7c/continew-starter/commit/31ca1fda528629906958d8422897ac8ae179daab))
|
- 【data/core】新增获取数据库类型带默认类型方法 ([31ca1fd](https://github.com/continew-org/continew-starter/commit/31ca1fda528629906958d8422897ac8ae179daab))
|
||||||
|
|
||||||
### 💎 功能优化
|
### 💎 功能优化
|
||||||
|
|
||||||
- 【security/crypto】调整部分 StrUtil => CharSequenceUtil ([2e5788f](https://github.com/Charles7c/continew-starter/commit/2e5788f007f61f0ec531aa69834229d128311398))
|
- 【security/crypto】调整部分 StrUtil => CharSequenceUtil ([2e5788f](https://github.com/continew-org/continew-starter/commit/2e5788f007f61f0ec531aa69834229d128311398))
|
||||||
- 【data/mybatis-plus】移除 ` 符号的使用,保持数据库无关性 ([557ea13](https://github.com/Charles7c/continew-starter/commit/557ea1375728695c027004e64e2fa8d2d66215e6))
|
- 【data/mybatis-plus】移除 ` 符号的使用,保持数据库无关性 ([557ea13](https://github.com/continew-org/continew-starter/commit/557ea1375728695c027004e64e2fa8d2d66215e6))
|
||||||
- 【core】完善自定义异常类构造方法 ([d42585c](https://github.com/Charles7c/continew-starter/commit/d42585cb4d6660724db004893f57a6c67b4690e1))
|
- 【core】完善自定义异常类构造方法 ([d42585c](https://github.com/continew-org/continew-starter/commit/d42585cb4d6660724db004893f57a6c67b4690e1))
|
||||||
- 【cache/redisson】完善 Redisson 工具类 ([9ed2dac](https://github.com/Charles7c/continew-starter/commit/9ed2dac00c58621cbc133e3e072c100306cf170a))
|
- 【cache/redisson】完善 Redisson 工具类 ([9ed2dac](https://github.com/continew-org/continew-starter/commit/9ed2dac00c58621cbc133e3e072c100306cf170a))
|
||||||
- 优化字符串模板方法 API 使用 ([c986784](https://github.com/Charles7c/continew-starter/commit/c9867844b650a69f6b3b3ea4f9af67807091eb1b))
|
- 优化字符串模板方法 API 使用 ([c986784](https://github.com/continew-org/continew-starter/commit/c9867844b650a69f6b3b3ea4f9af67807091eb1b))
|
||||||
|
|
||||||
### 🐛 问题修复
|
### 🐛 问题修复
|
||||||
|
|
||||||
- 【data/mybatis-plus】修复 Query In、Not In 查询数据类型转换错误 ([9bd4583](https://github.com/Charles7c/continew-starter/commit/9bd458322339f3197f1925347ff16f53fe0f3856))
|
- 【data/mybatis-plus】修复 Query In、Not In 查询数据类型转换错误 ([9bd4583](https://github.com/continew-org/continew-starter/commit/9bd458322339f3197f1925347ff16f53fe0f3856))
|
||||||
|
|
||||||
### 💥 破坏性变更
|
### 💥 破坏性变更
|
||||||
|
|
||||||
- 【log/core】continew-starter-log-common => continew-starter-log-core ([56a22c4](https://github.com/Charles7c/continew-starter/commit/56a22c4bce2445fb135d1fce7b6155fd5b48051e))
|
- 【log/core】continew-starter-log-common => continew-starter-log-core ([56a22c4](https://github.com/continew-org/continew-starter/commit/56a22c4bce2445fb135d1fce7b6155fd5b48051e))
|
||||||
- 【data/mybatis-plus】调整 Query 相关类到 data-core ([3f2a306](https://github.com/Charles7c/continew-starter/commit/3f2a306cad1d15436ae36c1b2eb54f28b50e84b9))
|
- 【data/mybatis-plus】调整 Query 相关类到 data-core ([3f2a306](https://github.com/continew-org/continew-starter/commit/3f2a306cad1d15436ae36c1b2eb54f28b50e84b9))
|
||||||
- 【extension/crud】调整 IService 到 data-core ([ab7e987](https://github.com/Charles7c/continew-starter/commit/ab7e987672202f3e80c0e4f64ea0c576ff7cc89f))
|
- 【extension/crud】调整 IService 到 data-core ([ab7e987](https://github.com/continew-org/continew-starter/commit/ab7e987672202f3e80c0e4f64ea0c576ff7cc89f))
|
||||||
- 更新 Gitee 项目链接 ([89108ad](https://github.com/Charles7c/continew-starter/commit/89108ad55addeaf47f224f4ed90ecb42244dbfd8))
|
- 更新 Gitee 项目链接 ([89108ad](https://github.com/continew-org/continew-starter/commit/89108ad55addeaf47f224f4ed90ecb42244dbfd8))
|
||||||
|
|
||||||
## [v1.4.0](https://github.com/Charles7c/continew-starter/compare/v1.3.0...v1.4.0) (2024-02-14)
|
## [v1.4.0](https://github.com/continew-org/continew-starter/compare/v1.3.0...v1.4.0) (2024-02-14)
|
||||||
|
|
||||||
### ✨ 新特性
|
### ✨ 新特性
|
||||||
|
|
||||||
- 【captcha/graphic】新增图形验证码服务接口,并调整验证码默认启用 ([3184faa](https://github.com/Charles7c/continew-starter/commit/3184faaa27111845867d2210f0db16381d53d800))
|
- 【captcha/graphic】新增图形验证码服务接口,并调整验证码默认启用 ([3184faa](https://github.com/continew-org/continew-starter/commit/3184faaa27111845867d2210f0db16381d53d800))
|
||||||
- 【log/httptrace-pro】Log 注解新增 include、exclude 属性,用于扩展或减少日志包含信息 ([669ea85](https://github.com/Charles7c/continew-starter/commit/669ea85658c89c631518def8f84d4f5d60059ad7)) ([2afb0b6](https://github.com/Charles7c/continew-starter/commit/2afb0b625fc936364c6dacacc735ce421c5cb37c))
|
- 【log/httptrace-pro】Log 注解新增 include、exclude 属性,用于扩展或减少日志包含信息 ([669ea85](https://github.com/continew-org/continew-starter/commit/669ea85658c89c631518def8f84d4f5d60059ad7)) ([2afb0b6](https://github.com/continew-org/continew-starter/commit/2afb0b625fc936364c6dacacc735ce421c5cb37c))
|
||||||
- 【security/mask】新增安全模块-脱敏,支持 JSON 数据脱敏 ([7b79519](https://github.com/Charles7c/continew-starter/commit/7b795194d3db979c239ab30d78fdb61d95f06896)) ([111e732](https://github.com/Charles7c/continew-starter/commit/111e7329673778c475c4ff4aa5ba6eef9f43f506))
|
- 【security/mask】新增安全模块-脱敏,支持 JSON 数据脱敏 ([7b79519](https://github.com/continew-org/continew-starter/commit/7b795194d3db979c239ab30d78fdb61d95f06896)) ([111e732](https://github.com/continew-org/continew-starter/commit/111e7329673778c475c4ff4aa5ba6eef9f43f506))
|
||||||
- 【security/crypto】新增安全模块-加密,支持 MyBatis ORM 框架字段加密 ([5ccdd9e](https://github.com/Charles7c/continew-starter/commit/5ccdd9e5da2a81d6a1f69bdf3f0e4eb1475b68a0)) ([88f82d1](https://github.com/Charles7c/continew-starter/commit/88f82d1c0aa5abf8f094564f4b84ae84efd80946)) ([b604f2f](https://github.com/Charles7c/continew-starter/commit/b604f2fc7eb938a52338ee41cf1823af374a14da)) ([74a1166](https://github.com/Charles7c/continew-starter/commit/74a1166b5f250c2ba8aab027d98bc11e59860c01)) ([9ebcd14](https://github.com/Charles7c/continew-starter/commit/9ebcd14878b499039a70380b0773b00b9f8dc111))
|
- 【security/crypto】新增安全模块-加密,支持 MyBatis ORM 框架字段加密 ([5ccdd9e](https://github.com/continew-org/continew-starter/commit/5ccdd9e5da2a81d6a1f69bdf3f0e4eb1475b68a0)) ([88f82d1](https://github.com/continew-org/continew-starter/commit/88f82d1c0aa5abf8f094564f4b84ae84efd80946)) ([b604f2f](https://github.com/continew-org/continew-starter/commit/b604f2fc7eb938a52338ee41cf1823af374a14da)) ([74a1166](https://github.com/continew-org/continew-starter/commit/74a1166b5f250c2ba8aab027d98bc11e59860c01)) ([9ebcd14](https://github.com/continew-org/continew-starter/commit/9ebcd14878b499039a70380b0773b00b9f8dc111))
|
||||||
- 【security/all】新增 continew-starter-security-all 模块,统一引入加密、脱敏、密码编码器能力 ([12c3d64](https://github.com/Charles7c/continew-starter/commit/12c3d640668298439ef0b610f5b36848e1f91b1a))
|
- 【security/all】新增 continew-starter-security-all 模块,统一引入加密、脱敏、密码编码器能力 ([12c3d64](https://github.com/continew-org/continew-starter/commit/12c3d640668298439ef0b610f5b36848e1f91b1a))
|
||||||
|
|
||||||
### 💎 功能优化
|
### 💎 功能优化
|
||||||
|
|
||||||
- 【log/httptrace-pro】默认启用日志 ([2aea8ba](https://github.com/Charles7c/continew-starter/commit/2aea8ba8318dded142a274221af7de2b62d4ced9))
|
- 【log/httptrace-pro】默认启用日志 ([2aea8ba](https://github.com/continew-org/continew-starter/commit/2aea8ba8318dded142a274221af7de2b62d4ced9))
|
||||||
- 【log/httptrace-pro】兼容小写 user-agent 情况 ([18b9d1b](https://github.com/Charles7c/continew-starter/commit/18b9d1ba799ce96d8831b7243508b2517ff5c5c7))
|
- 【log/httptrace-pro】兼容小写 user-agent 情况 ([18b9d1b](https://github.com/continew-org/continew-starter/commit/18b9d1ba799ce96d8831b7243508b2517ff5c5c7))
|
||||||
- 【auth/satoken】JWT 配置支持启用/关闭 ([c33a670](https://github.com/Charles7c/continew-starter/commit/c33a6709f50c2240cc9826c4ee2e83d88db5fb07))
|
- 【auth/satoken】JWT 配置支持启用/关闭 ([c33a670](https://github.com/continew-org/continew-starter/commit/c33a6709f50c2240cc9826c4ee2e83d88db5fb07))
|
||||||
- 【cache/redisson】优化协议前缀变量命名 ([00798bd](https://github.com/Charles7c/continew-starter/commit/00798bdb4c82c8ec8b3cf1110a0afaaa94ad2b27))
|
- 【cache/redisson】优化协议前缀变量命名 ([00798bd](https://github.com/continew-org/continew-starter/commit/00798bdb4c82c8ec8b3cf1110a0afaaa94ad2b27))
|
||||||
- 【auth】调整 Redisson 模块为可选依赖 ([00bba33](https://github.com/Charles7c/continew-starter/commit/00bba33517c15936ec2f40a8a7f3213d25a223aa))
|
- 【auth】调整 Redisson 模块为可选依赖 ([00bba33](https://github.com/continew-org/continew-starter/commit/00bba33517c15936ec2f40a8a7f3213d25a223aa))
|
||||||
- 【data/mybatis-plus】重构 ID 生成器配置,支持默认、CosId、自定义 ([c9311df](https://github.com/Charles7c/continew-starter/commit/c9311df093d4524b272535640333c413a2eda86f)) ([58dc51f](https://github.com/Charles7c/continew-starter/commit/58dc51f66c3a77f7f1621557cdd065243b6ae5a9))
|
- 【data/mybatis-plus】重构 ID 生成器配置,支持默认、CosId、自定义 ([c9311df](https://github.com/continew-org/continew-starter/commit/c9311df093d4524b272535640333c413a2eda86f)) ([58dc51f](https://github.com/continew-org/continew-starter/commit/58dc51f66c3a77f7f1621557cdd065243b6ae5a9))
|
||||||
- 【message/sms】精简部分依赖 ([f67f278](https://github.com/Charles7c/continew-starter/commit/f67f278784002de553c923f399d585e35f0a6356))
|
- 【message/sms】精简部分依赖 ([f67f278](https://github.com/continew-org/continew-starter/commit/f67f278784002de553c923f399d585e35f0a6356))
|
||||||
- 根据 Sonar 建议调整,StrUtil => CharSequenceUtil ([ea71cf5](https://github.com/Charles7c/continew-starter/commit/ea71cf573b7b6452b9315c67967f29e25468a04a))
|
- 根据 Sonar 建议调整,StrUtil => CharSequenceUtil ([ea71cf5](https://github.com/continew-org/continew-starter/commit/ea71cf573b7b6452b9315c67967f29e25468a04a))
|
||||||
|
|
||||||
### 🐛 问题修复
|
### 🐛 问题修复
|
||||||
|
|
||||||
- 【extension/crud】修复删除后置处理方法访问修饰符使用错误 ([24f9975](https://github.com/Charles7c/continew-starter/commit/24f99754d041e113f07eb43570d6a49c4ff24008))
|
- 【extension/crud】修复删除后置处理方法访问修饰符使用错误 ([24f9975](https://github.com/continew-org/continew-starter/commit/24f99754d041e113f07eb43570d6a49c4ff24008))
|
||||||
- 【message/mail】修复发送邮件收件人不为空判断错误 ([Gitee PR#12](https://gitee.com/continew/continew-starter/pulls/12))
|
- 【message/mail】修复发送邮件收件人不为空判断错误 ([Gitee PR#12](https://gitee.com/continew/continew-starter/pulls/12))
|
||||||
- 【auth/satoken】修复 SaInterceptor Bean 获取方式错误 ([1ba1596](https://github.com/Charles7c/continew-starter/commit/1ba1596f4e4b31d82e174e981711e45a1df67ee7))
|
- 【auth/satoken】修复 SaInterceptor Bean 获取方式错误 ([1ba1596](https://github.com/continew-org/continew-starter/commit/1ba1596f4e4b31d82e174e981711e45a1df67ee7))
|
||||||
|
|
||||||
### 📦 依赖升级
|
### 📦 依赖升级
|
||||||
|
|
||||||
- 【dependencies】Spring Boot 3.1.7 => 3.1.8 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
- 【dependencies】Spring Boot 3.1.7 => 3.1.8 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
||||||
- 【dependencies】Dynamic Datasource 4.2.0 => 4.3.0 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
- 【dependencies】Dynamic Datasource 4.2.0 => 4.3.0 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
||||||
- 【dependencies】JetCache 2.7.4 => 2.7.5 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
- 【dependencies】JetCache 2.7.4 => 2.7.5 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
||||||
- 【dependencies】Redisson 3.25.2 => 3.26.0 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
- 【dependencies】Redisson 3.25.2 => 3.26.0 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
||||||
- 【dependencies】SMS4J 3.0.4 => 3.1.1 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
- 【dependencies】SMS4J 3.0.4 => 3.1.1 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
||||||
- 【dependencies】X File Storage 2.0.0 => 2.1.0 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
- 【dependencies】X File Storage 2.0.0 => 2.1.0 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
||||||
- 【dependencies】Amazon S3 1.12.626 => 1.12.651 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
- 【dependencies】Amazon S3 1.12.626 => 1.12.651 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
||||||
- 【dependencies】Crane4j 2.4.0 => 2.5.0 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8)) ([c963978](https://github.com/Charles7c/continew-starter/commit/c96397898027140c243b034dc3d23bd3d60695e7))
|
- 【dependencies】Crane4j 2.4.0 => 2.5.0 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8)) ([c963978](https://github.com/continew-org/continew-starter/commit/c96397898027140c243b034dc3d23bd3d60695e7))
|
||||||
- 【dependencies】Knife4j 4.4.0 => 4.5.0 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
- 【dependencies】Knife4j 4.4.0 => 4.5.0 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
||||||
- 【dependencies】Hutool 5.8.24 => 5.8.25 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
- 【dependencies】Hutool 5.8.24 => 5.8.25 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
||||||
- 【dependencies】ip2region 3.1.6 => 3.1.7 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
- 【dependencies】ip2region 3.1.6 => 3.1.7 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
||||||
- 【dependencies】flatten-maven-plugin 1.5.0 => 1.6.0 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
- 【dependencies】flatten-maven-plugin 1.5.0 => 1.6.0 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
||||||
- 【dependencies】spotless-maven-plugin 2.40.0 => 2.43.0 ([ab76665](https://github.com/Charles7c/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
- 【dependencies】spotless-maven-plugin 2.40.0 => 2.43.0 ([ab76665](https://github.com/continew-org/continew-starter/commit/ab76665aab8cf06e508f039dbce13959e171d0c8))
|
||||||
|
|
||||||
## [v1.3.0](https://github.com/Charles7c/continew-starter/compare/v1.2.0...v1.3.0) (2024-02-03)
|
## [v1.3.0](https://github.com/continew-org/continew-starter/compare/v1.2.0...v1.3.0) (2024-02-03)
|
||||||
|
|
||||||
### ✨ 新特性
|
### ✨ 新特性
|
||||||
|
|
||||||
* 【data/mybatis-plus】新增 QueryIgnore 忽略查询解析注解 ([91651b0](https://github.com/Charles7c/continew-starter/commit/91651b0b59cf642cd59aca068d8bca4554dc9895))
|
* 【data/mybatis-plus】新增 QueryIgnore 忽略查询解析注解 ([91651b0](https://github.com/continew-org/continew-starter/commit/91651b0b59cf642cd59aca068d8bca4554dc9895))
|
||||||
* 【security/password】新增安全模块-密码编码器自动配置 ([47a4d57](https://github.com/Charles7c/continew-starter/commit/47a4d57dee3739de12ccbe9e15e25aef5b9ae558)) ([Gitee PR#9](https://gitee.com/continew/continew-starter/pulls/9))
|
* 【security/password】新增安全模块-密码编码器自动配置 ([47a4d57](https://github.com/continew-org/continew-starter/commit/47a4d57dee3739de12ccbe9e15e25aef5b9ae558)) ([Gitee PR#9](https://gitee.com/continew/continew-starter/pulls/9))
|
||||||
* 【web】新增链路跟踪自动配置 ([8fc19ab](https://github.com/Charles7c/continew-starter/commit/8fc19ab9b87b1a1b6d290ee9a40d0157de267324))
|
* 【web】新增链路跟踪自动配置 ([8fc19ab](https://github.com/continew-org/continew-starter/commit/8fc19ab9b87b1a1b6d290ee9a40d0157de267324))
|
||||||
|
|
||||||
### 💎 功能优化
|
### 💎 功能优化
|
||||||
|
|
||||||
- 【extension/crud】排序字段增加是否存在校验 ([Gitee PR#7](https://gitee.com/continew/continew-starter/pulls/7))
|
- 【extension/crud】排序字段增加是否存在校验 ([Gitee PR#7](https://gitee.com/continew/continew-starter/pulls/7))
|
||||||
- 【data/mybatis-plus】优化数据权限处理器代码结构 ([aecefa1](https://github.com/Charles7c/continew-starter/commit/aecefa15ecbb9660f2ffa2f3bef3ad9eeb810916))
|
- 【data/mybatis-plus】优化数据权限处理器代码结构 ([aecefa1](https://github.com/continew-org/continew-starter/commit/aecefa15ecbb9660f2ffa2f3bef3ad9eeb810916))
|
||||||
- 【auth/satoken】支持更灵活的动态化路由拦截鉴权 ([31f29db](https://github.com/Charles7c/continew-starter/commit/31f29db19dede2cbf6988946b0dd8c8f153d1bd9))
|
- 【auth/satoken】支持更灵活的动态化路由拦截鉴权 ([31f29db](https://github.com/continew-org/continew-starter/commit/31f29db19dede2cbf6988946b0dd8c8f153d1bd9))
|
||||||
- 【auth/satoken】优化 SaToken 持久层配置 ([e6f8ac8](https://github.com/Charles7c/continew-starter/commit/e6f8ac8afa1b6c487343dc88d8ac7fdfde40e58b))
|
- 【auth/satoken】优化 SaToken 持久层配置 ([e6f8ac8](https://github.com/continew-org/continew-starter/commit/e6f8ac8afa1b6c487343dc88d8ac7fdfde40e58b))
|
||||||
- 【captcha/behavior】优化行为验证码缓存配置 ([8598e6d](https://github.com/Charles7c/continew-starter/commit/8598e6d109c1ca6be3e973ceb41c6dd7bd93c333))
|
- 【captcha/behavior】优化行为验证码缓存配置 ([8598e6d](https://github.com/continew-org/continew-starter/commit/8598e6d109c1ca6be3e973ceb41c6dd7bd93c333))
|
||||||
- 【storage/local】优化存储模块依赖 ([dcb6568](https://github.com/Charles7c/continew-starter/commit/dcb6568916cd549f1c403ece1c4f4d29ecc320b9))
|
- 【storage/local】优化存储模块依赖 ([dcb6568](https://github.com/continew-org/continew-starter/commit/dcb6568916cd549f1c403ece1c4f4d29ecc320b9))
|
||||||
- 移除 Lombok 私有构造注解使用 ([11d0798](https://github.com/Charles7c/continew-starter/commit/11d0798f92a5fe4eda6300a7e6065f2d3afef0df))
|
- 移除 Lombok 私有构造注解使用 ([11d0798](https://github.com/continew-org/continew-starter/commit/11d0798f92a5fe4eda6300a7e6065f2d3afef0df))
|
||||||
- 移除 Lombok 依赖,再度精简依赖 ([0eb6afa](https://github.com/Charles7c/continew-starter/commit/0eb6afabb6ccaa9d421981280c896e381f68b9a6)) ([Gitee PR#9](https://gitee.com/continew/continew-starter/pulls/9))
|
- 移除 Lombok 依赖,再度精简依赖 ([0eb6afa](https://github.com/continew-org/continew-starter/commit/0eb6afabb6ccaa9d421981280c896e381f68b9a6)) ([Gitee PR#9](https://gitee.com/continew/continew-starter/pulls/9))
|
||||||
- 新增 Qodana、Sonar 扫描 ([ab1e999](https://github.com/Charles7c/continew-starter/commit/ab1e999094d9349a24eff51382a940f0ec682801)) ([1a8c589](https://github.com/Charles7c/continew-starter/commit/1a8c589083f80eddd2fe7e4c99751c699dd4d357))
|
- 新增 Qodana、Sonar 扫描 ([ab1e999](https://github.com/continew-org/continew-starter/commit/ab1e999094d9349a24eff51382a940f0ec682801)) ([1a8c589](https://github.com/continew-org/continew-starter/commit/1a8c589083f80eddd2fe7e4c99751c699dd4d357))
|
||||||
- 优化大量代码,解决 [Sonar](https://sonarcloud.io/organizations/charles7c/projects)、[Codacy](https://app.codacy.com/gh/Charles7c/continew-admin/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)、[Qodana](https://qodana.cloud/organizations/pQDPD/teams/p5jqd/) 扫描问题,点击各链接查看对应实时质量分析报告(Codacy 已达到 A)
|
- 优化大量代码,解决 [Sonar](https://sonarcloud.io/organizations/charles7c/projects)、[Codacy](https://app.codacy.com/gh/Charles7c/continew-admin/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)、[Qodana](https://qodana.cloud/organizations/pQDPD/teams/p5jqd/) 扫描问题,点击各链接查看对应实时质量分析报告(Codacy 已达到 A)
|
||||||
|
|
||||||
### 🐛 问题修复
|
### 🐛 问题修复
|
||||||
|
|
||||||
- 【web】配置 Validator 失败立即返回模式 ([1223f60](https://github.com/Charles7c/continew-starter/commit/1223f6052d459087419b7373b8a2d7cfa36ea45c))
|
- 【web】配置 Validator 失败立即返回模式 ([1223f60](https://github.com/continew-org/continew-starter/commit/1223f6052d459087419b7373b8a2d7cfa36ea45c))
|
||||||
|
|
||||||
### 💥 破坏性变更
|
### 💥 破坏性变更
|
||||||
|
|
||||||
- 【data/mybatis-plus】重构 QueryHelper => QueryWrapperHelper,支持多列查询,并删除 blurry 属性 ([6dc20e8](https://github.com/Charles7c/continew-starter/commit/6dc20e8909073f771c33736262290fe14095b2e7)) ([f16b968](https://github.com/Charles7c/continew-starter/commit/f16b968b3f161c58144e59c67629b5787ba2d60d)) ([13a6809](https://github.com/Charles7c/continew-starter/commit/13a6809e2aa9744b3c5ca3558d5709af7cde4698))
|
- 【data/mybatis-plus】重构 QueryHelper => QueryWrapperHelper,支持多列查询,并删除 blurry 属性 ([6dc20e8](https://github.com/continew-org/continew-starter/commit/6dc20e8909073f771c33736262290fe14095b2e7)) ([f16b968](https://github.com/continew-org/continew-starter/commit/f16b968b3f161c58144e59c67629b5787ba2d60d)) ([13a6809](https://github.com/continew-org/continew-starter/commit/13a6809e2aa9744b3c5ca3558d5709af7cde4698))
|
||||||
- 【extension/crud】优化包结构 ([eabedd8](https://github.com/Charles7c/continew-starter/commit/eabedd861b533068d4fed31c412401fdba50aa63))
|
- 【extension/crud】优化包结构 ([eabedd8](https://github.com/continew-org/continew-starter/commit/eabedd861b533068d4fed31c412401fdba50aa63))
|
||||||
- 【captcha/graphic】优化图形验证码自动配置,提供 Captcha Bean ([30d7631](https://github.com/Charles7c/continew-starter/commit/30d76314d66c392e36411229afeaed045f491d7a))
|
- 【captcha/graphic】优化图形验证码自动配置,提供 Captcha Bean ([30d7631](https://github.com/continew-org/continew-starter/commit/30d76314d66c392e36411229afeaed045f491d7a))
|
||||||
|
|
||||||
## [v1.2.0](https://github.com/Charles7c/continew-starter/compare/v1.1.1...v1.2.0) (2024-01-20)
|
## [v1.2.0](https://github.com/continew-org/continew-starter/compare/v1.1.1...v1.2.0) (2024-01-20)
|
||||||
|
|
||||||
### ✨ 新特性
|
### ✨ 新特性
|
||||||
|
|
||||||
* 【extension/crud】新增 Easy Excel 枚举接口转换器 ([8936268](https://github.com/Charles7c/continew-starter/commit/8936268038b4f554d00f738a2311b560bda205d8))
|
* 【extension/crud】新增 Easy Excel 枚举接口转换器 ([8936268](https://github.com/continew-org/continew-starter/commit/8936268038b4f554d00f738a2311b560bda205d8))
|
||||||
* 【extension/crud】适配 Crane4j 数据填充组件 ([5d26f34](https://github.com/Charles7c/continew-starter/commit/5d26f343da7c467905fd08dfd06aaa2c50e8bcce))
|
* 【extension/crud】适配 Crane4j 数据填充组件 ([5d26f34](https://github.com/continew-org/continew-starter/commit/5d26f343da7c467905fd08dfd06aaa2c50e8bcce))
|
||||||
* 【extension/crud】新增钩子方法,用于增强增、删、改方法 ([43dba72](https://github.com/Charles7c/continew-starter/commit/43dba72cee9cb148a53ec2df23b0ac2854a0a42d))
|
* 【extension/crud】新增钩子方法,用于增强增、删、改方法 ([43dba72](https://github.com/continew-org/continew-starter/commit/43dba72cee9cb148a53ec2df23b0ac2854a0a42d))
|
||||||
* 【extension/crud】新增 IService 通用业务接口 ([926c92c](https://github.com/Charles7c/continew-starter/commit/926c92cc321e5da9279400741986f71173a3eda3))
|
* 【extension/crud】新增 IService 通用业务接口 ([926c92c](https://github.com/continew-org/continew-starter/commit/926c92cc321e5da9279400741986f71173a3eda3))
|
||||||
* 【extension/crud】新增启用注解,便于灵活控制启用/关闭 CRUD REST API、全局异常处理器增强 ([9398d68](https://github.com/Charles7c/continew-starter/commit/9398d686bbd3b87a2a82e273a5bda37d05ca6f30))
|
* 【extension/crud】新增启用注解,便于灵活控制启用/关闭 CRUD REST API、全局异常处理器增强 ([9398d68](https://github.com/continew-org/continew-starter/commit/9398d686bbd3b87a2a82e273a5bda37d05ca6f30))
|
||||||
* 【cache/springcache】新增 Spring Cache 自动配置 ([e090083](https://github.com/Charles7c/continew-starter/commit/e090083ba26342aaf8378206949d6350f4f1444f))
|
* 【cache/springcache】新增 Spring Cache 自动配置 ([e090083](https://github.com/continew-org/continew-starter/commit/e090083ba26342aaf8378206949d6350f4f1444f))
|
||||||
* 【cache/jetcache】新增 JetCache 自动配置 ([156b02b](https://github.com/Charles7c/continew-starter/commit/156b02b3d77fa9f0476c23182d35df030a3ea66a))
|
* 【cache/jetcache】新增 JetCache 自动配置 ([156b02b](https://github.com/continew-org/continew-starter/commit/156b02b3d77fa9f0476c23182d35df030a3ea66a))
|
||||||
* 【web】新增 Web 模块,从核心模块拆分 Web 相关自动配置 ([9cf76fe](https://github.com/Charles7c/continew-starter/commit/9cf76fe61f2368244a501c1c036c0a55502f5c0a))
|
* 【web】新增 Web 模块,从核心模块拆分 Web 相关自动配置 ([9cf76fe](https://github.com/continew-org/continew-starter/commit/9cf76fe61f2368244a501c1c036c0a55502f5c0a))
|
||||||
|
|
||||||
### 💎 功能优化
|
### 💎 功能优化
|
||||||
|
|
||||||
- 新增部分 Maven 插件版本锁定 ([be14bca](https://github.com/Charles7c/continew-starter/commit/be14bca2ca6ba5a808f7feebaafcf9356d338643))
|
- 新增部分 Maven 插件版本锁定 ([be14bca](https://github.com/continew-org/continew-starter/commit/be14bca2ca6ba5a808f7feebaafcf9356d338643))
|
||||||
- 移除部分无用 Maven 配置 ([6d9e8b4](https://github.com/Charles7c/continew-starter/commit/6d9e8b43ebe8d891ab459a2c2f21e06936abdc1d))
|
- 移除部分无用 Maven 配置 ([6d9e8b4](https://github.com/continew-org/continew-starter/commit/6d9e8b43ebe8d891ab459a2c2f21e06936abdc1d))
|
||||||
- 全局统一 Hutool 版本,精简各模块 Hutool 依赖 ([Gitee PR#6](https://gitee.com/continew/continew-starter/pulls/6))
|
- 全局统一 Hutool 版本,精简各模块 Hutool 依赖 ([Gitee PR#6](https://gitee.com/continew/continew-starter/pulls/6))
|
||||||
- 调整部分类的所在包 ([b4b40b4](https://github.com/Charles7c/continew-starter/commit/b4b40b4cb929824e44bc7ad8737cbe73b283b34d))
|
- 调整部分类的所在包 ([b4b40b4](https://github.com/continew-org/continew-starter/commit/b4b40b4cb929824e44bc7ad8737cbe73b283b34d))
|
||||||
|
|
||||||
### 🐛 问题修复
|
### 🐛 问题修复
|
||||||
|
|
||||||
- 【log/httptrace-pro】修复隐藏接口仍然被记录请求日志的问题 ([f3ad2c4](https://github.com/Charles7c/continew-starter/commit/f3ad2c48a9511ef611d414596539e838adef8e45))
|
- 【log/httptrace-pro】修复隐藏接口仍然被记录请求日志的问题 ([f3ad2c4](https://github.com/continew-org/continew-starter/commit/f3ad2c48a9511ef611d414596539e838adef8e45))
|
||||||
|
|
||||||
### 💥 破坏性变更
|
### 💥 破坏性变更
|
||||||
|
|
||||||
- 【extension/crud】移动全局异常处理器到 Web 模块 ([ec0ebd0](https://github.com/Charles7c/continew-starter/commit/ec0ebd00e49a2e67daa97d4a4f531f49acd5d89d))
|
- 【extension/crud】移动全局异常处理器到 Web 模块 ([ec0ebd0](https://github.com/continew-org/continew-starter/commit/ec0ebd00e49a2e67daa97d4a4f531f49acd5d89d))
|
||||||
|
|
||||||
## [v1.1.2](https://github.com/Charles7c/continew-starter/compare/v1.1.0...v1.1.2) (2024-01-11)
|
## [v1.1.2](https://github.com/continew-org/continew-starter/compare/v1.1.0...v1.1.2) (2024-01-11)
|
||||||
|
|
||||||
> 由于发布 `v1.1.1` 至 Maven 仓库时出现异常,且按其规则无法修改错误数据,改为递增版本号为 `v1.1.2` 并发布。
|
> 由于发布 `v1.1.1` 至 Maven 仓库时出现异常,且按其规则无法修改错误数据,改为递增版本号为 `v1.1.2` 并发布。
|
||||||
|
|
||||||
### ✨ 新特性
|
### ✨ 新特性
|
||||||
|
|
||||||
* 【extension/crud】BaseService 增加 list 查询列表方法重载 ([81ed292](https://github.com/Charles7c/continew-starter/commit/81ed29284090edcfc5ea5351442b5de2ce1622df))
|
* 【extension/crud】BaseService 增加 list 查询列表方法重载 ([81ed292](https://github.com/continew-org/continew-starter/commit/81ed29284090edcfc5ea5351442b5de2ce1622df))
|
||||||
* 【core】新增 SpringUtils 工具类 ([3de75cf](https://github.com/Charles7c/continew-starter/commit/3de75cf7fe79bc86ca5022d56e5f46be4d90d623))
|
* 【core】新增 SpringUtils 工具类 ([3de75cf](https://github.com/continew-org/continew-starter/commit/3de75cf7fe79bc86ca5022d56e5f46be4d90d623))
|
||||||
|
|
||||||
### 💎 功能优化
|
### 💎 功能优化
|
||||||
|
|
||||||
- 【log/httptrace-pro】优化日志过滤器,仅在需要记录请求体、响应体时进行过滤 ([d68d88d](https://github.com/Charles7c/continew-starter/commit/d68d88db218d5008140c3056827dd6ac608a8b62))
|
- 【log/httptrace-pro】优化日志过滤器,仅在需要记录请求体、响应体时进行过滤 ([d68d88d](https://github.com/continew-org/continew-starter/commit/d68d88db218d5008140c3056827dd6ac608a8b62))
|
||||||
- 【log/httptrace-pro】优化 @Log 注解信息获取优先级逻辑 ([Gitee PR#5](https://gitee.com/continew/continew-starter/pulls/5))
|
- 【log/httptrace-pro】优化 @Log 注解信息获取优先级逻辑 ([Gitee PR#5](https://gitee.com/continew/continew-starter/pulls/5))
|
||||||
- 【extension/crud】优化 BaseServiceImpl 中获取各泛型参数类型的方式 ([6fc0b51](https://github.com/Charles7c/continew-starter/commit/6fc0b51a574434db9d21d1f254b3fce344c9f2f6))
|
- 【extension/crud】优化 BaseServiceImpl 中获取各泛型参数类型的方式 ([6fc0b51](https://github.com/continew-org/continew-starter/commit/6fc0b51a574434db9d21d1f254b3fce344c9f2f6))
|
||||||
- 【extension/crud】减少查询列表时可能的无用转换 ([0565372](https://github.com/Charles7c/continew-starter/commit/0565372e9aa8010a1c4625be4cf85d557a7eed7b))
|
- 【extension/crud】减少查询列表时可能的无用转换 ([0565372](https://github.com/continew-org/continew-starter/commit/0565372e9aa8010a1c4625be4cf85d557a7eed7b))
|
||||||
- 使用常量优化部分配置属性名 ([2025068](https://github.com/Charles7c/continew-starter/commit/20250681da7682de159b6259e80193b204e55047))
|
- 使用常量优化部分配置属性名 ([2025068](https://github.com/continew-org/continew-starter/commit/20250681da7682de159b6259e80193b204e55047))
|
||||||
- 优化日志级别 info => debug ([1e7d4b2](https://github.com/Charles7c/continew-starter/commit/1e7d4b2721fae3459cb6d1b57f208f0c38dbbc6f))
|
- 优化日志级别 info => debug ([1e7d4b2](https://github.com/continew-org/continew-starter/commit/1e7d4b2721fae3459cb6d1b57f208f0c38dbbc6f))
|
||||||
- 优化全局代码格式 ([57c21a9](https://github.com/Charles7c/continew-starter/commit/57c21a9109a412ed78c6c9b8aa0cd0f0b5724432))
|
- 优化全局代码格式 ([57c21a9](https://github.com/continew-org/continew-starter/commit/57c21a9109a412ed78c6c9b8aa0cd0f0b5724432))
|
||||||
|
|
||||||
### 💥 破坏性变更
|
### 💥 破坏性变更
|
||||||
|
|
||||||
- 【extension/crud】PageDataResp => PageResp ([38d2800](https://github.com/Charles7c/continew-starter/commit/38d28004d63a0218bfcae5689f9909ce6dcd824f))
|
- 【extension/crud】PageDataResp => PageResp ([38d2800](https://github.com/continew-org/continew-starter/commit/38d28004d63a0218bfcae5689f9909ce6dcd824f))
|
||||||
|
|
||||||
## [v1.1.0](https://github.com/Charles7c/continew-starter/compare/v1.0.1...v1.1.0) (2023-12-31)
|
## [v1.1.0](https://github.com/continew-org/continew-starter/compare/v1.0.1...v1.1.0) (2023-12-31)
|
||||||
|
|
||||||
### ✨ 新特性
|
### ✨ 新特性
|
||||||
|
|
||||||
* 【log/httptrace-pro】新增 continew-starter-log-httptrace-pro 日志模块(Spring Boot Actuator HttpTrace 重置增强版)
|
* 【log/httptrace-pro】新增 continew-starter-log-httptrace-pro 日志模块(Spring Boot Actuator HttpTrace 重置增强版)
|
||||||
* 【storage/local】新增 continew-starter-storage-local 本地存储模块 ([cd6826a](https://github.com/Charles7c/continew-starter/commit/cd6826a0abe0666f9fe867e92bf70abb47e5ff2e))
|
* 【storage/local】新增 continew-starter-storage-local 本地存储模块 ([cd6826a](https://github.com/continew-org/continew-starter/commit/cd6826a0abe0666f9fe867e92bf70abb47e5ff2e))
|
||||||
* 【cache/redisson】RedisUtils 新增限流方法 ([9cf3ae8](https://github.com/Charles7c/continew-starter/commit/9cf3ae87a1a20db9ee8b2b7272e8328b5fc5c20c))
|
* 【cache/redisson】RedisUtils 新增限流方法 ([9cf3ae8](https://github.com/continew-org/continew-starter/commit/9cf3ae87a1a20db9ee8b2b7272e8328b5fc5c20c))
|
||||||
* 【data/mybatis-plus】新增数据权限默认解决方案 ([621a5e3](https://github.com/Charles7c/continew-starter/commit/621a5e3b22db9b81d31c65b39ad387a8531e09af))
|
* 【data/mybatis-plus】新增数据权限默认解决方案 ([621a5e3](https://github.com/continew-org/continew-starter/commit/621a5e3b22db9b81d31c65b39ad387a8531e09af))
|
||||||
* 【captcha/behavior】新增 continew-starter-captcha-behavior 行为验证码模块 ([Gitee PR#1](https://gitee.com/continew/continew-starter/pulls/1))
|
* 【captcha/behavior】新增 continew-starter-captcha-behavior 行为验证码模块 ([Gitee PR#1](https://gitee.com/continew/continew-starter/pulls/1))
|
||||||
* 【core】新增 PATH_PATTERN 字符串常量 ([76e282c](https://github.com/Charles7c/continew-starter/commit/76e282c7965fdfa39854fe77397687bbc40d0f7f))
|
* 【core】新增 PATH_PATTERN 字符串常量 ([76e282c](https://github.com/continew-org/continew-starter/commit/76e282c7965fdfa39854fe77397687bbc40d0f7f))
|
||||||
|
|
||||||
### 💎 功能优化
|
### 💎 功能优化
|
||||||
|
|
||||||
- 【core】优化跨域配置默认值 ([65f5fbd](https://github.com/Charles7c/continew-starter/commit/65f5fbd6daa9ae2c8aedd13c487e8985523233ce))
|
- 【core】优化跨域配置默认值 ([65f5fbd](https://github.com/continew-org/continew-starter/commit/65f5fbd6daa9ae2c8aedd13c487e8985523233ce))
|
||||||
- 【extension/crud】新增全局异常处理器 ([c4459d1](https://github.com/Charles7c/continew-starter/commit/c4459d1b8d701a4405f74ea92cfc87752a285b55))
|
- 【extension/crud】新增全局异常处理器 ([c4459d1](https://github.com/continew-org/continew-starter/commit/c4459d1b8d701a4405f74ea92cfc87752a285b55))
|
||||||
- 【extension/crud】移除部分方法中仅有单个非读操作的事务处理 ([70ae383](https://github.com/Charles7c/continew-starter/commit/70ae383de62bc3c6ae0d2e1c3cf5c005d54f83f5))
|
- 【extension/crud】移除部分方法中仅有单个非读操作的事务处理 ([70ae383](https://github.com/continew-org/continew-starter/commit/70ae383de62bc3c6ae0d2e1c3cf5c005d54f83f5))
|
||||||
|
|
||||||
### 📦 依赖升级
|
### 📦 依赖升级
|
||||||
|
|
||||||
- 【dependencies】Spring Boot 3.1.5 => 3.1.7 ([72f5569](https://github.com/Charles7c/continew-starter/commit/72f55697cc8958bf3586daed03a8d1b3c8636605))
|
- 【dependencies】Spring Boot 3.1.5 => 3.1.7 ([72f5569](https://github.com/continew-org/continew-starter/commit/72f55697cc8958bf3586daed03a8d1b3c8636605))
|
||||||
- 【dependencies】Just Auth 1.16.5 => 1.16.6 ([72f5569](https://github.com/Charles7c/continew-starter/commit/72f55697cc8958bf3586daed03a8d1b3c8636605))
|
- 【dependencies】Just Auth 1.16.5 => 1.16.6 ([72f5569](https://github.com/continew-org/continew-starter/commit/72f55697cc8958bf3586daed03a8d1b3c8636605))
|
||||||
- 【dependencies】Redisson 3.24.3 => 3.25.2 ([72f5569](https://github.com/Charles7c/continew-starter/commit/72f55697cc8958bf3586daed03a8d1b3c8636605))
|
- 【dependencies】Redisson 3.24.3 => 3.25.2 ([72f5569](https://github.com/continew-org/continew-starter/commit/72f55697cc8958bf3586daed03a8d1b3c8636605))
|
||||||
- 【dependencies】Easy Excel 3.3.2 => 3.3.3 ([72f5569](https://github.com/Charles7c/continew-starter/commit/72f55697cc8958bf3586daed03a8d1b3c8636605))
|
- 【dependencies】Easy Excel 3.3.2 => 3.3.3 ([72f5569](https://github.com/continew-org/continew-starter/commit/72f55697cc8958bf3586daed03a8d1b3c8636605))
|
||||||
- 【dependencies】Knife4j 4.3.0 => 4.4.0 ([72f5569](https://github.com/Charles7c/continew-starter/commit/72f55697cc8958bf3586daed03a8d1b3c8636605))
|
- 【dependencies】Knife4j 4.3.0 => 4.4.0 ([72f5569](https://github.com/continew-org/continew-starter/commit/72f55697cc8958bf3586daed03a8d1b3c8636605))
|
||||||
- 【dependencies】Hutool 5.8.23 => 5.8.24 ([72f5569](https://github.com/Charles7c/continew-starter/commit/72f55697cc8958bf3586daed03a8d1b3c8636605))
|
- 【dependencies】Hutool 5.8.23 => 5.8.24 ([72f5569](https://github.com/continew-org/continew-starter/commit/72f55697cc8958bf3586daed03a8d1b3c8636605))
|
||||||
- 【dependencies】MyBatis Plus 3.5.4.1 => 3.5.5(修复与 Spring Boot 3.1.7 的 DdlApplicationRunner冲突错误) ([556bfb9](https://github.com/Charles7c/continew-starter/commit/556bfb924a1e5834fe0a101b9ff52cc5bb36d578))
|
- 【dependencies】MyBatis Plus 3.5.4.1 => 3.5.5(修复与 Spring Boot 3.1.7 的 DdlApplicationRunner冲突错误) ([556bfb9](https://github.com/continew-org/continew-starter/commit/556bfb924a1e5834fe0a101b9ff52cc5bb36d578))
|
||||||
- 【dependencies】新增 X File Storage 依赖版本 2.0.0 ([be7972c](https://github.com/Charles7c/continew-starter/commit/be7972c00be8d62cc25332e053a985532016de2d))
|
- 【dependencies】新增 X File Storage 依赖版本 2.0.0 ([be7972c](https://github.com/continew-org/continew-starter/commit/be7972c00be8d62cc25332e053a985532016de2d))
|
||||||
- 【dependencies】ip2region 3.1.5.1 => 3.1.6 ([4dae89e](https://github.com/Charles7c/continew-starter/commit/4dae89e0f21ac6c532101e983ee4007f3980c929))
|
- 【dependencies】ip2region 3.1.5.1 => 3.1.6 ([4dae89e](https://github.com/continew-org/continew-starter/commit/4dae89e0f21ac6c532101e983ee4007f3980c929))
|
||||||
- 【dependencies】新增 Amazon S3 依赖版本 1.12.626 ([48f894b](https://github.com/Charles7c/continew-starter/commit/48f894b8b62f8b968091dcea51b57336b97e4a2d))
|
- 【dependencies】新增 Amazon S3 依赖版本 1.12.626 ([48f894b](https://github.com/continew-org/continew-starter/commit/48f894b8b62f8b968091dcea51b57336b97e4a2d))
|
||||||
|
|
||||||
### 💥 破坏性变更
|
### 💥 破坏性变更
|
||||||
|
|
||||||
- 【captcha/graphic】优化图形验证码配置前缀 ([e0e5944](https://github.com/Charles7c/continew-starter/commit/e0e5944b45bcbf8a4b7a5066ad347459a7b3e450))
|
- 【captcha/graphic】优化图形验证码配置前缀 ([e0e5944](https://github.com/continew-org/continew-starter/commit/e0e5944b45bcbf8a4b7a5066ad347459a7b3e450))
|
||||||
- 【data/mybatis-plus】调整 IBaseEnum 所属包 enums => base ([22fee2f](https://github.com/Charles7c/continew-starter/commit/22fee2f5bd8211e26c2f6a163a6298f5b522833c))
|
- 【data/mybatis-plus】调整 IBaseEnum 所属包 enums => base ([22fee2f](https://github.com/continew-org/continew-starter/commit/22fee2f5bd8211e26c2f6a163a6298f5b522833c))
|
||||||
- 【auth/satoken】SaTokenDaoTypeEnum => SaTokenDaoType ([0a0d022](https://github.com/Charles7c/continew-starter/commit/0a0d022586dc88a773512c5761c68d62786e35c4))
|
- 【auth/satoken】SaTokenDaoTypeEnum => SaTokenDaoType ([0a0d022](https://github.com/continew-org/continew-starter/commit/0a0d022586dc88a773512c5761c68d62786e35c4))
|
||||||
- 【core】使用常量优化部分魔法值,核心模块部分配置前缀调整 ([52dce2a](https://github.com/Charles7c/continew-starter/commit/52dce2acdfa0296c3f6f4875f14a0299f999f899))
|
- 【core】使用常量优化部分魔法值,核心模块部分配置前缀调整 ([52dce2a](https://github.com/continew-org/continew-starter/commit/52dce2acdfa0296c3f6f4875f14a0299f999f899))
|
||||||
|
|
||||||
## [v1.0.1](https://github.com/Charles7c/continew-starter/compare/v1.0.0...v1.0.1) (2023-12-13)
|
## [v1.0.1](https://github.com/continew-org/continew-starter/compare/v1.0.0...v1.0.1) (2023-12-13)
|
||||||
|
|
||||||
### 💎 功能优化
|
### 💎 功能优化
|
||||||
|
|
||||||
- 【data/mybatis-plus】QueryTypeEnum => QueryType,并取消实现 IBaseEnum 接口 ([bc00c9b](https://github.com/Charles7c/continew-starter/commit/bc00c9bab0ed4508fd1dc0da8a76ef96739cce1d))
|
- 【data/mybatis-plus】QueryTypeEnum => QueryType,并取消实现 IBaseEnum 接口 ([bc00c9b](https://github.com/continew-org/continew-starter/commit/bc00c9bab0ed4508fd1dc0da8a76ef96739cce1d))
|
||||||
- 【api-doc】新增鉴权配置 ([7997267](https://github.com/Charles7c/continew-starter/commit/7997267060b3e79f80dd73cec722bc295635a93b))
|
- 【api-doc】新增鉴权配置 ([7997267](https://github.com/continew-org/continew-starter/commit/7997267060b3e79f80dd73cec722bc295635a93b))
|
||||||
|
|
||||||
### 🐛 问题修复
|
### 🐛 问题修复
|
||||||
|
|
||||||
- 【extension/crud】修复使用 @CrudRequestMapping 后自定义 API 不显示的问题 ([1adfddf](https://github.com/Charles7c/continew-starter/commit/1adfddfa3b276e764b098512b2e9c75f007d13c1))
|
- 【extension/crud】修复使用 @CrudRequestMapping 后自定义 API 不显示的问题 ([1adfddf](https://github.com/continew-org/continew-starter/commit/1adfddfa3b276e764b098512b2e9c75f007d13c1))
|
||||||
|
|
||||||
### 💥 破坏性变更
|
### 💥 破坏性变更
|
||||||
|
|
||||||
- 【extension/crud】调整通用查询注解所属模块 crud => mybatis-plus ([083bc7b](https://github.com/Charles7c/continew-starter/commit/083bc7b38a861339ceb7a06acdd20ea64bc84990))
|
- 【extension/crud】调整通用查询注解所属模块 crud => mybatis-plus ([083bc7b](https://github.com/continew-org/continew-starter/commit/083bc7b38a861339ceb7a06acdd20ea64bc84990))
|
||||||
- 【extension/crud】调整校验工具类所属模块 crud => core ([083bc7b](https://github.com/Charles7c/continew-starter/commit/083bc7b38a861339ceb7a06acdd20ea64bc84990))
|
- 【extension/crud】调整校验工具类所属模块 crud => core ([083bc7b](https://github.com/continew-org/continew-starter/commit/083bc7b38a861339ceb7a06acdd20ea64bc84990))
|
||||||
|
|
||||||
## v1.0.0 (2023-12-02)
|
## v1.0.0 (2023-12-02)
|
||||||
|
|
||||||
|
|||||||
33
README.md
33
README.md
@@ -1,15 +1,12 @@
|
|||||||
# ContiNew Starter
|
# ContiNew Starter
|
||||||
|
|
||||||
<a href="https://github.com/Charles7c/continew-starter/blob/dev/LICENSE" target="_blank">
|
<a href="https://github.com/continew-org/continew-starter/blob/dev/LICENSE" target="_blank">
|
||||||
<img src="https://img.shields.io/badge/License-LGPL--3.0-blue.svg" alt="License" />
|
<img src="https://img.shields.io/badge/License-LGPL--3.0-blue.svg" alt="License" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://central.sonatype.com/search?q=continew-starter" target="_blank">
|
<a href="https://central.sonatype.com/search?q=continew-starter" target="_blank">
|
||||||
<img src="https://img.shields.io/maven-central/v/top.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>
|
||||||
<a href="https://github.com/Charles7c/continew-starter" target="_blank">
|
<a href="https://app.codacy.com/gh/continew-org/continew-starter/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade" target="_blank">
|
||||||
<img src="https://img.shields.io/badge/RELEASE-v2.1.0-%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" />
|
<img src="https://app.codacy.com/project/badge/Grade/90ed633957a9410aa8745f0654827c01" alt="Codacy Badge" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://sonarcloud.io/summary/new_code?id=Charles7c_continew-starter" target="_blank">
|
<a href="https://sonarcloud.io/summary/new_code?id=Charles7c_continew-starter" target="_blank">
|
||||||
@@ -18,14 +15,14 @@
|
|||||||
<a href="https://spring.io/projects/spring-boot" target="_blank">
|
<a href="https://spring.io/projects/spring-boot" target="_blank">
|
||||||
<img src="https://img.shields.io/badge/Spring Boot-3.1.11-%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>
|
||||||
<a href="https://github.com/Charles7c/continew-starter" target="_blank">
|
<a href="https://github.com/continew-org/continew-starter" target="_blank">
|
||||||
<img src="https://img.shields.io/badge/Open JDK-17-%236CB52D.svg?logo=OpenJDK&logoColor=FFF" alt="Open JDK" />
|
<img src="https://img.shields.io/badge/Open JDK-17-%236CB52D.svg?logo=OpenJDK&logoColor=FFF" alt="Open JDK" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Charles7c/continew-starter" target="_blank">
|
<a href="https://github.com/continew-org/continew-starter" target="_blank">
|
||||||
<img src="https://img.shields.io/github/stars/Charles7c/continew-starter?style=social" alt="GitHub stars" />
|
<img src="https://img.shields.io/github/stars/continew-org/continew-starter?style=social" alt="GitHub stars" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Charles7c/continew-starter" target="_blank">
|
<a href="https://github.com/continew-org/continew-starter" target="_blank">
|
||||||
<img src="https://img.shields.io/github/forks/Charles7c/continew-starter?style=social" alt="GitHub forks" />
|
<img src="https://img.shields.io/github/forks/continew-org/continew-starter?style=social" alt="GitHub forks" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://gitee.com/continew/continew-starter" target="_blank">
|
<a href="https://gitee.com/continew/continew-starter" target="_blank">
|
||||||
<img src="https://gitee.com/continew/continew-starter/badge/star.svg?theme=white" alt="Gitee stars" />
|
<img src="https://gitee.com/continew/continew-starter/badge/star.svg?theme=white" alt="Gitee stars" />
|
||||||
@@ -65,7 +62,7 @@ ContiNew Starter 就是将脚手架项目中的通用基础配置进行了封装
|
|||||||
|
|
||||||
| 开源平台 | 源码地址 |
|
| 开源平台 | 源码地址 |
|
||||||
| :------------ | :-------------------------------------------- |
|
| :------------ | :-------------------------------------------- |
|
||||||
| GitHub | https://github.com/Charles7c/continew-starter |
|
| GitHub | https://github.com/continew-org/continew-starter |
|
||||||
| Gitee(码云) | https://gitee.com/continew/continew-starter |
|
| Gitee(码云) | https://gitee.com/continew/continew-starter |
|
||||||
|
|
||||||
## 像数1,2,3一样容易
|
## 像数1,2,3一样容易
|
||||||
@@ -252,7 +249,7 @@ ContiNew Starter 的分支目前分为下个大版本的开发分支和上个大
|
|||||||
2. 然后,将 fork 过来的项目(即您的项目)克隆到本地
|
2. 然后,将 fork 过来的项目(即您的项目)克隆到本地
|
||||||
3. 切换到当前仍在维护的分支(请务必充分了解分支使用说明,可进群联系维护者确认)
|
3. 切换到当前仍在维护的分支(请务必充分了解分支使用说明,可进群联系维护者确认)
|
||||||
4. 开始修改代码,修改完成后,将代码 commit 并 push 到您的远程仓库
|
4. 开始修改代码,修改完成后,将代码 commit 并 push 到您的远程仓库
|
||||||
5. 在 Gitee 或 Github 上新建 pull request(pr),选择好源和目标,按模板要求填写说明信息后提交即可(多多参考 [已批准合并的 pr 记录](https://github.com/Charles7c/continew-starter/pulls?q=is%3Apr+is%3Amerged),会大大增加批准合并率)
|
5. 在 Gitee 或 Github 上新建 pull request(pr),选择好源和目标,按模板要求填写说明信息后提交即可(多多参考 [已批准合并的 pr 记录](https://github.com/continew-org/continew-starter/pulls?q=is%3Apr+is%3Amerged),会大大增加批准合并率)
|
||||||
6. 最后,耐心等待维护者合并您的请求即可
|
6. 最后,耐心等待维护者合并您的请求即可
|
||||||
|
|
||||||
请记住,如果您有任何疑问或需要帮助,我们将随时提供支持。
|
请记住,如果您有任何疑问或需要帮助,我们将随时提供支持。
|
||||||
@@ -260,7 +257,7 @@ ContiNew Starter 的分支目前分为下个大版本的开发分支和上个大
|
|||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> 欢迎大家为 ContiNew Starter 贡献代码,我们非常感谢您的支持!为了更好地管理项目,维护者有一些要求:
|
> 欢迎大家为 ContiNew Starter 贡献代码,我们非常感谢您的支持!为了更好地管理项目,维护者有一些要求:
|
||||||
>
|
>
|
||||||
> 1. 请确保代码、配置文件的结构和命名规范良好,完善的代码注释,并遵循阿里巴巴的 <a href="https://github.com/Charles7c/continew-starter/blob/dev/.style/Java%E5%BC%80%E5%8F%91%E6%89%8B%E5%86%8C(%E9%BB%84%E5%B1%B1%E7%89%88).pdf" target="_blank">《Java开发手册(黄山版)》</a> 中的代码规范,保证代码质量和可维护性
|
> 1. 请确保代码、配置文件的结构和命名规范良好,完善的代码注释,并遵循阿里巴巴的 <a href="https://github.com/continew-org/continew-starter/blob/dev/.style/Java%E5%BC%80%E5%8F%91%E6%89%8B%E5%86%8C(%E9%BB%84%E5%B1%B1%E7%89%88).pdf" target="_blank">《Java开发手册(黄山版)》</a> 中的代码规范,保证代码质量和可维护性
|
||||||
> 2. 在提交代码前,请按照 [Angular 提交规范](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) 编写 commit 的 message(建议在 IntelliJ IDEA 中下载并安装 Git Commit Template 插件,以便按照规范进行 commit)
|
> 2. 在提交代码前,请按照 [Angular 提交规范](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) 编写 commit 的 message(建议在 IntelliJ IDEA 中下载并安装 Git Commit Template 插件,以便按照规范进行 commit)
|
||||||
> 3. 提交代码之前,请关闭所有代码窗口,执行 `mvn compile` 命令(代码格式化插件会在项目编译时对全局代码进行格式修正),编译通过后,不要再打开查看任何代码窗口,直接提交即可
|
> 3. 提交代码之前,请关闭所有代码窗口,执行 `mvn compile` 命令(代码格式化插件会在项目编译时对全局代码进行格式修正),编译通过后,不要再打开查看任何代码窗口,直接提交即可
|
||||||
|
|
||||||
@@ -276,11 +273,11 @@ ContiNew Starter 的分支目前分为下个大版本的开发分支和上个大
|
|||||||
- 和众多大佬互相 (huá shuǐ) 交流 (mō yú)
|
- 和众多大佬互相 (huá shuǐ) 交流 (mō yú)
|
||||||
|
|
||||||
<div align="left">
|
<div align="left">
|
||||||
<img src="https://doc.charles7c.top/qrcode.jpg" alt="二维码" width="230px" />
|
<img src="https://continew.top/qrcode.jpg" alt="二维码" width="230px" />
|
||||||
</div>
|
</div>
|
||||||
<details>
|
<details>
|
||||||
<summary>无加群意愿</summary>
|
<summary>无加群意愿</summary>
|
||||||
💬 如无加群意愿,欢迎在 <a href="https://github.com/Charles7c/continew-starter/issues" target="_blank">Issues</a> 中反馈交流~ 🍻
|
💬 如无加群意愿,欢迎在 <a href="https://github.com/continew-org/continew-starter/issues" target="_blank">Issues</a> 中反馈交流~ 🍻
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## 鸣谢
|
## 鸣谢
|
||||||
@@ -289,8 +286,8 @@ ContiNew Starter 的分支目前分为下个大版本的开发分支和上个大
|
|||||||
|
|
||||||
感谢参与贡献的每一位小伙伴🥰
|
感谢参与贡献的每一位小伙伴🥰
|
||||||
|
|
||||||
<a href="https://github.com/Charles7c/continew-starter/graphs/contributors">
|
<a href="https://github.com/continew-org/continew-starter/graphs/contributors">
|
||||||
<img src="https://contrib.rocks/image?repo=Charles7c/continew-starter" />
|
<img src="https://contrib.rocks/image?repo=continew-org/continew-starter" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
### 特别鸣谢
|
### 特别鸣谢
|
||||||
@@ -304,7 +301,7 @@ ContiNew Starter 的分支目前分为下个大版本的开发分支和上个大
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
- 遵循 <a href="https://github.com/Charles7c/continew-starter/blob/dev/LICENSE" target="_blank">LGPL-3.0</a> 开源许可协议
|
- 遵循 <a href="https://github.com/continew-org/continew-starter/blob/dev/LICENSE" target="_blank">LGPL-3.0</a> 开源许可协议
|
||||||
- Copyright © 2022-present <a href="https://blog.charles7c.top" target="_blank">Charles7c</a>
|
- Copyright © 2022-present <a href="https://blog.charles7c.top" target="_blank">Charles7c</a>
|
||||||
|
|
||||||
## GitHub Star 趋势
|
## GitHub Star 趋势
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import top.continew.starter.core.constant.StringConstants;
|
|||||||
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Redis 工具类
|
* Redis 工具类
|
||||||
@@ -54,11 +55,7 @@ public class RedisUtils {
|
|||||||
* @param duration 过期时间
|
* @param duration 过期时间
|
||||||
*/
|
*/
|
||||||
public static <T> void set(String key, T value, Duration duration) {
|
public static <T> void set(String key, T value, Duration duration) {
|
||||||
RBatch batch = CLIENT.createBatch();
|
CLIENT.getBucket(key).set(value, duration);
|
||||||
RBucketAsync<T> bucket = batch.getBucket(key);
|
|
||||||
bucket.setAsync(value);
|
|
||||||
bucket.expireAsync(duration);
|
|
||||||
batch.execute();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,6 +69,46 @@ public class RedisUtils {
|
|||||||
return bucket.get();
|
return bucket.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置缓存(List 集合)
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param value 值
|
||||||
|
* @since 2.1.1
|
||||||
|
*/
|
||||||
|
public static <T> void setList(String key, List<T> value) {
|
||||||
|
RList<T> list = CLIENT.getList(key);
|
||||||
|
list.addAll(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置缓存(List 集合)
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param value 值
|
||||||
|
* @param duration 过期时间
|
||||||
|
* @since 2.1.1
|
||||||
|
*/
|
||||||
|
public static <T> void setList(String key, List<T> value, Duration duration) {
|
||||||
|
RBatch batch = CLIENT.createBatch();
|
||||||
|
RListAsync<T> list = batch.getList(key);
|
||||||
|
list.addAllAsync(value);
|
||||||
|
list.expireAsync(duration);
|
||||||
|
batch.execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询指定缓存(List 集合)
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @return 值
|
||||||
|
* @since 2.1.1
|
||||||
|
*/
|
||||||
|
public static <T> List<T> getList(String key) {
|
||||||
|
RList<T> list = CLIENT.getList(key);
|
||||||
|
return list.readAll();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除缓存
|
* 删除缓存
|
||||||
*
|
*
|
||||||
@@ -113,17 +150,6 @@ public class RedisUtils {
|
|||||||
return CLIENT.getAtomicLong(key).decrementAndGet();
|
return CLIENT.getAtomicLong(key).decrementAndGet();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置缓存过期时间
|
|
||||||
*
|
|
||||||
* @param key 键
|
|
||||||
* @param timeout 过期时间(单位:秒)
|
|
||||||
* @return true:设置成功;false:设置失败
|
|
||||||
*/
|
|
||||||
public static boolean expire(String key, long timeout) {
|
|
||||||
return expire(key, Duration.ofSeconds(timeout));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置缓存过期时间
|
* 设置缓存过期时间
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ public class ThreadPoolAutoConfiguration {
|
|||||||
@Bean
|
@Bean
|
||||||
public ThreadPoolTaskExecutor threadPoolTaskExecutor(ThreadPoolProperties properties) {
|
public ThreadPoolTaskExecutor threadPoolTaskExecutor(ThreadPoolProperties properties) {
|
||||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||||
|
executor.setThreadNamePrefix("thread-pool");
|
||||||
// 核心(最小)线程数
|
// 核心(最小)线程数
|
||||||
executor.setCorePoolSize(ObjectUtil.defaultIfNull(properties.getCorePoolSize(), corePoolSize));
|
executor.setCorePoolSize(ObjectUtil.defaultIfNull(properties.getCorePoolSize(), corePoolSize));
|
||||||
// 最大线程数
|
// 最大线程数
|
||||||
@@ -98,7 +99,7 @@ public class ThreadPoolAutoConfiguration {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 应用关闭时,关闭线程池
|
// 应用关闭时,关闭线程池
|
||||||
SpringApplication.getShutdownHandlers().add(() -> shutdown(executor, properties));
|
SpringApplication.getShutdownHandlers().add(() -> this.shutdown(executor, properties));
|
||||||
log.debug("[ContiNew Starter] - Auto Configuration 'ScheduledExecutorService' completed initialization.");
|
log.debug("[ContiNew Starter] - Auto Configuration 'ScheduledExecutorService' completed initialization.");
|
||||||
return executor;
|
return executor;
|
||||||
}
|
}
|
||||||
@@ -107,6 +108,7 @@ public class ThreadPoolAutoConfiguration {
|
|||||||
* 根据相应的配置设置关闭 ExecutorService
|
* 根据相应的配置设置关闭 ExecutorService
|
||||||
*
|
*
|
||||||
* @see org.springframework.scheduling.concurrent.ExecutorConfigurationSupport#shutdown()
|
* @see org.springframework.scheduling.concurrent.ExecutorConfigurationSupport#shutdown()
|
||||||
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
public void shutdown(ExecutorService executor, ThreadPoolProperties properties) {
|
public void shutdown(ExecutorService executor, ThreadPoolProperties properties) {
|
||||||
log.debug("[ContiNew Starter] - Shutting down ScheduledExecutorService start.");
|
log.debug("[ContiNew Starter] - Shutting down ScheduledExecutorService start.");
|
||||||
@@ -129,6 +131,7 @@ public class ThreadPoolAutoConfiguration {
|
|||||||
*
|
*
|
||||||
* @param task the task to cancel (typically a {@link RunnableFuture})
|
* @param task the task to cancel (typically a {@link RunnableFuture})
|
||||||
* @see RunnableFuture#cancel(boolean)
|
* @see RunnableFuture#cancel(boolean)
|
||||||
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
protected void cancelRemainingTask(Runnable task) {
|
protected void cancelRemainingTask(Runnable task) {
|
||||||
if (task instanceof Future<?> future) {
|
if (task instanceof Future<?> future) {
|
||||||
@@ -138,6 +141,8 @@ public class ThreadPoolAutoConfiguration {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Wait for the executor to terminate, according to the value of the properties
|
* Wait for the executor to terminate, according to the value of the properties
|
||||||
|
*
|
||||||
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
private void awaitTerminationIfNecessary(ExecutorService executor, ThreadPoolProperties properties) {
|
private void awaitTerminationIfNecessary(ExecutorService executor, ThreadPoolProperties properties) {
|
||||||
if (properties.getAwaitTerminationMillis() > 0) {
|
if (properties.getAwaitTerminationMillis() > 0) {
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ public class IpUtils {
|
|||||||
* @param ip IP 地址
|
* @param ip IP 地址
|
||||||
* @return IP 归属地
|
* @return IP 归属地
|
||||||
*/
|
*/
|
||||||
public static String getAddress(String ip) {
|
public static String getIpv4Address(String ip) {
|
||||||
if (isInnerIp(ip)) {
|
if (isInnerIpv4(ip)) {
|
||||||
return "内网IP";
|
return "内网IP";
|
||||||
}
|
}
|
||||||
Ip2regionSearcher ip2regionSearcher = SpringUtil.getBean(Ip2regionSearcher.class);
|
Ip2regionSearcher ip2regionSearcher = SpringUtil.getBean(Ip2regionSearcher.class);
|
||||||
@@ -64,7 +64,7 @@ public class IpUtils {
|
|||||||
* @param ip IP 地址
|
* @param ip IP 地址
|
||||||
* @return 是否为内网 IP
|
* @return 是否为内网 IP
|
||||||
*/
|
*/
|
||||||
public static boolean isInnerIp(String ip) {
|
public static boolean isInnerIpv4(String ip) {
|
||||||
return NetUtil.isInnerIP("0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : HtmlUtil.cleanHtmlTag(ip));
|
return NetUtil.isInnerIP("0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : HtmlUtil.cleanHtmlTag(ip));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,11 @@ public class MyBatisPlusExtensionProperties {
|
|||||||
*/
|
*/
|
||||||
private PaginationProperties pagination;
|
private PaginationProperties pagination;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启用防全表更新与删除插件
|
||||||
|
*/
|
||||||
|
private boolean blockAttackPluginEnabled = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据权限插件配置属性
|
* 数据权限插件配置属性
|
||||||
*/
|
*/
|
||||||
@@ -175,4 +180,12 @@ public class MyBatisPlusExtensionProperties {
|
|||||||
public void setPagination(PaginationProperties pagination) {
|
public void setPagination(PaginationProperties pagination) {
|
||||||
this.pagination = pagination;
|
this.pagination = pagination;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isBlockAttackPluginEnabled() {
|
||||||
|
return blockAttackPluginEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBlockAttackPluginEnabled(boolean blockAttackPluginEnabled) {
|
||||||
|
this.blockAttackPluginEnabled = blockAttackPluginEnabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ public class MybatisPlusAutoConfiguration {
|
|||||||
interceptor.addInnerInterceptor(this.paginationInnerInterceptor(paginationProperties));
|
interceptor.addInnerInterceptor(this.paginationInnerInterceptor(paginationProperties));
|
||||||
}
|
}
|
||||||
// 防全表更新与删除插件
|
// 防全表更新与删除插件
|
||||||
interceptor.addInnerInterceptor(new BlockAttackInnerInterceptor());
|
if (properties.isBlockAttackPluginEnabled()) {
|
||||||
|
interceptor.addInnerInterceptor(new BlockAttackInnerInterceptor());
|
||||||
|
}
|
||||||
return interceptor;
|
return interceptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -176,7 +176,6 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler {
|
|||||||
* @param expression 处理前的表达式
|
* @param expression 处理前的表达式
|
||||||
* @return 处理完后的表达式
|
* @return 处理完后的表达式
|
||||||
*/
|
*/
|
||||||
//
|
|
||||||
private Expression buildSelfExpression(DataPermission dataPermission,
|
private Expression buildSelfExpression(DataPermission dataPermission,
|
||||||
DataPermissionCurrentUser currentUser,
|
DataPermissionCurrentUser currentUser,
|
||||||
Expression expression) {
|
Expression expression) {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<description>ContiNew Starter 依赖模块</description>
|
<description>ContiNew Starter 依赖模块</description>
|
||||||
<url>https://github.com/Charles7c/continew-starter</url>
|
<url>https://github.com/continew-org/continew-starter</url>
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
||||||
@@ -36,14 +36,14 @@
|
|||||||
</developer>
|
</developer>
|
||||||
</developers>
|
</developers>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:Charles7c/continew-starter.git</connection>
|
<connection>scm:git:git@github.com:continew-org/continew-starter.git</connection>
|
||||||
<developerConnection>scm:git:git@github.com:Charles7c/continew-starter.git</developerConnection>
|
<developerConnection>scm:git:git@github.com:continew-org/continew-starter.git</developerConnection>
|
||||||
<url>https://github.com/Charles7c/continew-starter</url>
|
<url>https://github.com/continew-org/continew-starter</url>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- 项目版本号 -->
|
<!-- 项目版本号 -->
|
||||||
<revision>2.1.0</revision>
|
<revision>2.1.1</revision>
|
||||||
<sa-token.version>1.38.0</sa-token.version>
|
<sa-token.version>1.38.0</sa-token.version>
|
||||||
<just-auth.version>1.16.6</just-auth.version>
|
<just-auth.version>1.16.6</just-auth.version>
|
||||||
<mybatis-plus.version>3.5.5</mybatis-plus.version>
|
<mybatis-plus.version>3.5.5</mybatis-plus.version>
|
||||||
|
|||||||
@@ -28,6 +28,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>top.continew</groupId>
|
<groupId>top.continew</groupId>
|
||||||
<artifactId>continew-starter-auth-satoken</artifactId>
|
<artifactId>continew-starter-auth-satoken</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 文件处理模块 - Excel -->
|
<!-- 文件处理模块 - Excel -->
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ package top.continew.starter.log.core.model;
|
|||||||
|
|
||||||
import cn.hutool.core.text.CharSequenceUtil;
|
import cn.hutool.core.text.CharSequenceUtil;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
|
import top.continew.starter.core.util.ExceptionUtils;
|
||||||
import top.continew.starter.core.util.IpUtils;
|
import top.continew.starter.core.util.IpUtils;
|
||||||
import top.continew.starter.log.core.enums.Include;
|
import top.continew.starter.log.core.enums.Include;
|
||||||
import top.continew.starter.web.util.ServletUtils;
|
import top.continew.starter.web.util.ServletUtils;
|
||||||
@@ -89,7 +90,9 @@ public class LogRequest {
|
|||||||
} else if (includes.contains(Include.REQUEST_PARAM)) {
|
} else if (includes.contains(Include.REQUEST_PARAM)) {
|
||||||
this.param = request.getParam();
|
this.param = request.getParam();
|
||||||
}
|
}
|
||||||
this.address = (includes.contains(Include.IP_ADDRESS)) ? IpUtils.getAddress(this.ip) : null;
|
this.address = (includes.contains(Include.IP_ADDRESS))
|
||||||
|
? ExceptionUtils.exToNull(() -> IpUtils.getIpv4Address(this.ip))
|
||||||
|
: null;
|
||||||
if (null == this.headers) {
|
if (null == this.headers) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,11 @@ public class MailConfig {
|
|||||||
*/
|
*/
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发件人
|
||||||
|
*/
|
||||||
|
private String from;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否启用 SSL 连接
|
* 是否启用 SSL 连接
|
||||||
*/
|
*/
|
||||||
@@ -121,6 +126,14 @@ public class MailConfig {
|
|||||||
this.password = password;
|
this.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getFrom() {
|
||||||
|
return from;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFrom(String from) {
|
||||||
|
this.from = from;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isSslEnabled() {
|
public boolean isSslEnabled() {
|
||||||
return sslEnabled;
|
return sslEnabled;
|
||||||
}
|
}
|
||||||
@@ -157,6 +170,7 @@ public class MailConfig {
|
|||||||
public Properties toJavaMailProperties() {
|
public Properties toJavaMailProperties() {
|
||||||
Properties javaMailProperties = new Properties();
|
Properties javaMailProperties = new Properties();
|
||||||
javaMailProperties.putAll(this.getProperties());
|
javaMailProperties.putAll(this.getProperties());
|
||||||
|
javaMailProperties.put("mail.from", this.getFrom());
|
||||||
javaMailProperties.put("mail.smtp.auth", true);
|
javaMailProperties.put("mail.smtp.auth", true);
|
||||||
javaMailProperties.put("mail.smtp.ssl.enable", this.isSslEnabled());
|
javaMailProperties.put("mail.smtp.ssl.enable", this.isSslEnabled());
|
||||||
if (this.isSslEnabled()) {
|
if (this.isSslEnabled()) {
|
||||||
|
|||||||
@@ -164,7 +164,8 @@ public class MailUtils {
|
|||||||
MimeMessageHelper messageHelper = new MimeMessageHelper(mimeMessage, true, StandardCharsets.UTF_8
|
MimeMessageHelper messageHelper = new MimeMessageHelper(mimeMessage, true, StandardCharsets.UTF_8
|
||||||
.displayName());
|
.displayName());
|
||||||
// 设置基本信息
|
// 设置基本信息
|
||||||
messageHelper.setFrom(mailSender.getUsername());
|
messageHelper.setFrom(CharSequenceUtil.blankToDefault(mailSender.getJavaMailProperties()
|
||||||
|
.getProperty("mail.from"), mailSender.getUsername()));
|
||||||
messageHelper.setSubject(subject);
|
messageHelper.setSubject(subject);
|
||||||
messageHelper.setText(content, isHtml);
|
messageHelper.setText(content, isHtml);
|
||||||
// 设置收信人
|
// 设置收信人
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
|||||||
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
|
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
|
||||||
import org.springframework.web.socket.server.HandshakeInterceptor;
|
import org.springframework.web.socket.server.HandshakeInterceptor;
|
||||||
import top.continew.starter.core.constant.PropertiesConstants;
|
import top.continew.starter.core.constant.PropertiesConstants;
|
||||||
import top.continew.starter.messaging.websocket.core.CurrentUserProvider;
|
import top.continew.starter.messaging.websocket.core.WebSocketClientService;
|
||||||
import top.continew.starter.messaging.websocket.core.WebSocketInterceptor;
|
import top.continew.starter.messaging.websocket.core.WebSocketInterceptor;
|
||||||
import top.continew.starter.messaging.websocket.dao.WebSocketSessionDao;
|
import top.continew.starter.messaging.websocket.dao.WebSocketSessionDao;
|
||||||
import top.continew.starter.messaging.websocket.dao.WebSocketSessionDaoDefaultImpl;
|
import top.continew.starter.messaging.websocket.dao.WebSocketSessionDaoDefaultImpl;
|
||||||
@@ -73,7 +73,7 @@ public class WebSocketAutoConfiguration {
|
|||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean
|
@ConditionalOnMissingBean
|
||||||
public HandshakeInterceptor handshakeInterceptor() {
|
public HandshakeInterceptor handshakeInterceptor() {
|
||||||
return new WebSocketInterceptor(properties, SpringUtil.getBean(CurrentUserProvider.class));
|
return new WebSocketInterceptor(properties, SpringUtil.getBean(WebSocketClientService.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -86,12 +86,12 @@ public class WebSocketAutoConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前用户 Provider(如不提供,则报错)
|
* WebSocket 客户端服务(如不提供,则报错)
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean
|
@ConditionalOnMissingBean
|
||||||
public CurrentUserProvider currentUserProvider() {
|
public WebSocketClientService webSocketClientService() {
|
||||||
throw new NoSuchBeanDefinitionException(CurrentUserProvider.class);
|
throw new NoSuchBeanDefinitionException(WebSocketClientService.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ public class WebSocketProperties {
|
|||||||
private List<String> allowedOrigins = new ArrayList<>(ALL);
|
private List<String> allowedOrigins = new ArrayList<>(ALL);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前登录用户 Key
|
* 客户端 ID Key
|
||||||
*/
|
*/
|
||||||
private String currentUserKey = "CURRENT_USER";
|
private String clientIdKey = "CLIENT_ID";
|
||||||
|
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
return enabled;
|
return enabled;
|
||||||
@@ -80,11 +80,11 @@ public class WebSocketProperties {
|
|||||||
this.allowedOrigins = allowedOrigins;
|
this.allowedOrigins = allowedOrigins;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCurrentUserKey() {
|
public String getClientIdKey() {
|
||||||
return currentUserKey;
|
return clientIdKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCurrentUserKey(String currentUserKey) {
|
public void setClientIdKey(String clientIdKey) {
|
||||||
this.currentUserKey = currentUserKey;
|
this.clientIdKey = clientIdKey;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,21 +17,20 @@
|
|||||||
package top.continew.starter.messaging.websocket.core;
|
package top.continew.starter.messaging.websocket.core;
|
||||||
|
|
||||||
import org.springframework.http.server.ServletServerHttpRequest;
|
import org.springframework.http.server.ServletServerHttpRequest;
|
||||||
import top.continew.starter.messaging.websocket.model.CurrentUser;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前登录用户 Provider
|
* WebSocket 客户端服务
|
||||||
*
|
*
|
||||||
* @author Charles7c
|
* @author Charles7c
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
*/
|
*/
|
||||||
public interface CurrentUserProvider {
|
public interface WebSocketClientService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前登录用户
|
* 获取当前客户端 ID
|
||||||
*
|
*
|
||||||
* @param request 请求对象
|
* @param request 请求对象
|
||||||
* @return 当前登录用户
|
* @return 当前客户端 ID
|
||||||
*/
|
*/
|
||||||
CurrentUser getCurrentUser(ServletServerHttpRequest request);
|
String getClientId(ServletServerHttpRequest request);
|
||||||
}
|
}
|
||||||
@@ -22,10 +22,12 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.springframework.web.socket.CloseStatus;
|
import org.springframework.web.socket.CloseStatus;
|
||||||
import org.springframework.web.socket.TextMessage;
|
import org.springframework.web.socket.TextMessage;
|
||||||
import org.springframework.web.socket.WebSocketSession;
|
import org.springframework.web.socket.WebSocketSession;
|
||||||
import org.springframework.web.socket.handler.AbstractWebSocketHandler;
|
import org.springframework.web.socket.handler.TextWebSocketHandler;
|
||||||
import top.continew.starter.messaging.websocket.autoconfigure.WebSocketProperties;
|
import top.continew.starter.messaging.websocket.autoconfigure.WebSocketProperties;
|
||||||
import top.continew.starter.messaging.websocket.dao.WebSocketSessionDao;
|
import top.continew.starter.messaging.websocket.dao.WebSocketSessionDao;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WebSocket 处理器
|
* WebSocket 处理器
|
||||||
*
|
*
|
||||||
@@ -33,7 +35,7 @@ import top.continew.starter.messaging.websocket.dao.WebSocketSessionDao;
|
|||||||
* @author Charles7c
|
* @author Charles7c
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
*/
|
*/
|
||||||
public class WebSocketHandler extends AbstractWebSocketHandler {
|
public class WebSocketHandler extends TextWebSocketHandler {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(WebSocketHandler.class);
|
private static final Logger log = LoggerFactory.getLogger(WebSocketHandler.class);
|
||||||
private final WebSocketProperties webSocketProperties;
|
private final WebSocketProperties webSocketProperties;
|
||||||
@@ -46,26 +48,41 @@ public class WebSocketHandler extends AbstractWebSocketHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void handleTextMessage(WebSocketSession session, TextMessage message) throws Exception {
|
protected void handleTextMessage(WebSocketSession session, TextMessage message) throws Exception {
|
||||||
log.info("WebSocket receive message. sessionId: {}, message: {}.", session.getId(), message.getPayload());
|
String clientId = this.getClientId(session);
|
||||||
|
log.info("WebSocket receive message. clientId: {}, message: {}.", clientId, message.getPayload());
|
||||||
super.handleTextMessage(session, message);
|
super.handleTextMessage(session, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterConnectionEstablished(WebSocketSession session) {
|
public void afterConnectionEstablished(WebSocketSession session) {
|
||||||
String sessionKey = Convert.toStr(session.getAttributes().get(webSocketProperties.getCurrentUserKey()));
|
String clientId = this.getClientId(session);
|
||||||
webSocketSessionDao.add(sessionKey, session);
|
webSocketSessionDao.add(clientId, session);
|
||||||
log.info("WebSocket connect successfully. sessionKey: {}.", sessionKey);
|
log.info("WebSocket client connect successfully. clientId: {}.", clientId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) {
|
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) {
|
||||||
String sessionKey = Convert.toStr(session.getAttributes().get(webSocketProperties.getCurrentUserKey()));
|
String clientId = this.getClientId(session);
|
||||||
webSocketSessionDao.delete(sessionKey);
|
webSocketSessionDao.delete(clientId);
|
||||||
log.info("WebSocket connect closed. sessionKey: {}.", sessionKey);
|
log.info("WebSocket client connect closed. clientId: {}.", clientId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleTransportError(WebSocketSession session, Throwable exception) {
|
public void handleTransportError(WebSocketSession session, Throwable exception) throws IOException {
|
||||||
log.error("WebSocket transport error. sessionId: {}.", session.getId(), exception);
|
String clientId = this.getClientId(session);
|
||||||
|
if (session.isOpen()) {
|
||||||
|
session.close();
|
||||||
|
}
|
||||||
|
webSocketSessionDao.delete(clientId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取客户端 ID
|
||||||
|
*
|
||||||
|
* @param session 会话
|
||||||
|
* @return 客户端 ID
|
||||||
|
*/
|
||||||
|
private String getClientId(WebSocketSession session) {
|
||||||
|
return Convert.toStr(session.getAttributes().get(webSocketProperties.getClientIdKey()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import org.springframework.http.server.ServletServerHttpRequest;
|
|||||||
import org.springframework.web.socket.WebSocketHandler;
|
import org.springframework.web.socket.WebSocketHandler;
|
||||||
import org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor;
|
import org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor;
|
||||||
import top.continew.starter.messaging.websocket.autoconfigure.WebSocketProperties;
|
import top.continew.starter.messaging.websocket.autoconfigure.WebSocketProperties;
|
||||||
import top.continew.starter.messaging.websocket.model.CurrentUser;
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -36,11 +35,12 @@ import java.util.Map;
|
|||||||
public class WebSocketInterceptor extends HttpSessionHandshakeInterceptor {
|
public class WebSocketInterceptor extends HttpSessionHandshakeInterceptor {
|
||||||
|
|
||||||
private final WebSocketProperties webSocketProperties;
|
private final WebSocketProperties webSocketProperties;
|
||||||
private final CurrentUserProvider currentUserProvider;
|
private final WebSocketClientService webSocketClientService;
|
||||||
|
|
||||||
public WebSocketInterceptor(WebSocketProperties webSocketProperties, CurrentUserProvider currentUserProvider) {
|
public WebSocketInterceptor(WebSocketProperties webSocketProperties,
|
||||||
|
WebSocketClientService webSocketClientService) {
|
||||||
this.webSocketProperties = webSocketProperties;
|
this.webSocketProperties = webSocketProperties;
|
||||||
this.currentUserProvider = currentUserProvider;
|
this.webSocketClientService = webSocketClientService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -48,8 +48,8 @@ public class WebSocketInterceptor extends HttpSessionHandshakeInterceptor {
|
|||||||
ServerHttpResponse response,
|
ServerHttpResponse response,
|
||||||
WebSocketHandler wsHandler,
|
WebSocketHandler wsHandler,
|
||||||
Map<String, Object> attributes) {
|
Map<String, Object> attributes) {
|
||||||
CurrentUser currentUser = currentUserProvider.getCurrentUser((ServletServerHttpRequest)request);
|
String clientId = webSocketClientService.getClientId((ServletServerHttpRequest)request);
|
||||||
attributes.put(webSocketProperties.getCurrentUserKey(), currentUser.getUserId());
|
attributes.put(webSocketProperties.getClientIdKey(), clientId);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
|
|
||||||
* <p>
|
|
||||||
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* <p>
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
* <p>
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package top.continew.starter.messaging.websocket.model;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前登录用户信息
|
|
||||||
*
|
|
||||||
* @author Charles7c
|
|
||||||
* @since 2.1.0
|
|
||||||
*/
|
|
||||||
public class CurrentUser implements Serializable {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户 ID
|
|
||||||
*/
|
|
||||||
private String userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 扩展字段
|
|
||||||
*/
|
|
||||||
private Object extend;
|
|
||||||
|
|
||||||
public String getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Object getExtend() {
|
|
||||||
return extend;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setExtend(Object extend) {
|
|
||||||
this.extend = extend;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -44,11 +44,11 @@ public class WebSocketUtils {
|
|||||||
/**
|
/**
|
||||||
* 发送消息
|
* 发送消息
|
||||||
*
|
*
|
||||||
* @param sessionKey 会话 Key
|
* @param clientId 客户端 ID
|
||||||
* @param message 消息内容
|
* @param message 消息内容
|
||||||
*/
|
*/
|
||||||
public static void sendMessage(String sessionKey, String message) {
|
public static void sendMessage(String clientId, String message) {
|
||||||
WebSocketSession session = SESSION_DAO.get(sessionKey);
|
WebSocketSession session = SESSION_DAO.get(clientId);
|
||||||
sendMessage(session, message);
|
sendMessage(session, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,19 @@ public abstract class AbstractMyBatisInterceptor implements Interceptor {
|
|||||||
* @return 加密参数
|
* @return 加密参数
|
||||||
*/
|
*/
|
||||||
public Map<String, FieldEncrypt> getEncryptParams(String mappedStatementId) {
|
public Map<String, FieldEncrypt> getEncryptParams(String mappedStatementId) {
|
||||||
return ENCRYPT_PARAM_CACHE.computeIfAbsent(mappedStatementId, this::getEncryptParamsNoCached);
|
return getEncryptParams(mappedStatementId, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取加密参数
|
||||||
|
*
|
||||||
|
* @param mappedStatementId 映射语句 ID
|
||||||
|
* @param parameterIndex 参数索引
|
||||||
|
* @return 加密参数
|
||||||
|
*/
|
||||||
|
public Map<String, FieldEncrypt> getEncryptParams(String mappedStatementId, Integer parameterIndex) {
|
||||||
|
return ENCRYPT_PARAM_CACHE
|
||||||
|
.computeIfAbsent(mappedStatementId, m -> getEncryptParamsNoCached(mappedStatementId, parameterIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -105,9 +117,10 @@ public abstract class AbstractMyBatisInterceptor implements Interceptor {
|
|||||||
* 获取参数列表(无缓存)
|
* 获取参数列表(无缓存)
|
||||||
*
|
*
|
||||||
* @param mappedStatementId 映射语句 ID
|
* @param mappedStatementId 映射语句 ID
|
||||||
|
* @param parameterIndex 参数数量
|
||||||
* @return 参数列表
|
* @return 参数列表
|
||||||
*/
|
*/
|
||||||
private Map<String, FieldEncrypt> getEncryptParamsNoCached(String mappedStatementId) {
|
private Map<String, FieldEncrypt> getEncryptParamsNoCached(String mappedStatementId, Integer parameterIndex) {
|
||||||
try {
|
try {
|
||||||
String className = CharSequenceUtil.subBefore(mappedStatementId, StringConstants.DOT, true);
|
String className = CharSequenceUtil.subBefore(mappedStatementId, StringConstants.DOT, true);
|
||||||
String wrapperMethodName = CharSequenceUtil.subAfter(mappedStatementId, StringConstants.DOT, true);
|
String wrapperMethodName = CharSequenceUtil.subAfter(mappedStatementId, StringConstants.DOT, true);
|
||||||
@@ -117,8 +130,12 @@ public abstract class AbstractMyBatisInterceptor implements Interceptor {
|
|||||||
.map(suffix -> wrapperMethodName.substring(0, wrapperMethodName.length() - suffix.length()))
|
.map(suffix -> wrapperMethodName.substring(0, wrapperMethodName.length() - suffix.length()))
|
||||||
.orElse(wrapperMethodName);
|
.orElse(wrapperMethodName);
|
||||||
// 获取真实方法
|
// 获取真实方法
|
||||||
Optional<Method> methodOptional = Arrays.stream(ReflectUtil.getMethods(Class
|
Optional<Method> methodOptional = Arrays.stream(ReflectUtil.getMethods(Class.forName(className), m -> {
|
||||||
.forName(className), m -> Objects.equals(m.getName(), methodName))).findFirst();
|
if (Objects.nonNull(parameterIndex)) {
|
||||||
|
return Objects.equals(m.getName(), methodName) && m.getParameterCount() == parameterIndex;
|
||||||
|
}
|
||||||
|
return Objects.equals(m.getName(), methodName);
|
||||||
|
})).findFirst();
|
||||||
if (methodOptional.isEmpty()) {
|
if (methodOptional.isEmpty()) {
|
||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
}
|
}
|
||||||
@@ -136,6 +153,8 @@ public abstract class AbstractMyBatisInterceptor implements Interceptor {
|
|||||||
}
|
}
|
||||||
} else if (parameterName.startsWith(Constants.ENTITY)) {
|
} else if (parameterName.startsWith(Constants.ENTITY)) {
|
||||||
map.put(parameterName, null);
|
map.put(parameterName, null);
|
||||||
|
} else if (parameterName.startsWith(Constants.WRAPPER)) {
|
||||||
|
map.put(parameterName, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
|||||||
@@ -16,8 +16,15 @@
|
|||||||
|
|
||||||
package top.continew.starter.security.crypto.core;
|
package top.continew.starter.security.crypto.core;
|
||||||
|
|
||||||
|
import cn.hutool.core.text.CharSequenceUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.ReflectUtil;
|
import cn.hutool.core.util.ReflectUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.AbstractWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.TableFieldInfo;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.TableInfo;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
import org.apache.ibatis.cache.CacheKey;
|
import org.apache.ibatis.cache.CacheKey;
|
||||||
import org.apache.ibatis.executor.Executor;
|
import org.apache.ibatis.executor.Executor;
|
||||||
@@ -28,11 +35,14 @@ import org.apache.ibatis.plugin.*;
|
|||||||
import org.apache.ibatis.session.ResultHandler;
|
import org.apache.ibatis.session.ResultHandler;
|
||||||
import org.apache.ibatis.session.RowBounds;
|
import org.apache.ibatis.session.RowBounds;
|
||||||
import org.apache.ibatis.type.SimpleTypeRegistry;
|
import org.apache.ibatis.type.SimpleTypeRegistry;
|
||||||
|
import top.continew.starter.core.constant.StringConstants;
|
||||||
import top.continew.starter.security.crypto.annotation.FieldEncrypt;
|
import top.continew.starter.security.crypto.annotation.FieldEncrypt;
|
||||||
import top.continew.starter.security.crypto.autoconfigure.CryptoProperties;
|
import top.continew.starter.security.crypto.autoconfigure.CryptoProperties;
|
||||||
import top.continew.starter.security.crypto.encryptor.IEncryptor;
|
import top.continew.starter.security.crypto.encryptor.IEncryptor;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.ParameterizedType;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -99,13 +109,18 @@ public class MyBatisEncryptInterceptor extends AbstractMyBatisInterceptor {
|
|||||||
* @throws Exception /
|
* @throws Exception /
|
||||||
*/
|
*/
|
||||||
private void encryptMap(HashMap<String, Object> parameterMap, MappedStatement mappedStatement) throws Exception {
|
private void encryptMap(HashMap<String, Object> parameterMap, MappedStatement mappedStatement) throws Exception {
|
||||||
Map<String, FieldEncrypt> encryptParamMap = super.getEncryptParams(mappedStatement.getId());
|
Map<String, FieldEncrypt> encryptParamMap = super.getEncryptParams(mappedStatement.getId(), parameterMap
|
||||||
|
.isEmpty() ? null : parameterMap.size() / 2);
|
||||||
for (Map.Entry<String, FieldEncrypt> encryptParamEntry : encryptParamMap.entrySet()) {
|
for (Map.Entry<String, FieldEncrypt> encryptParamEntry : encryptParamMap.entrySet()) {
|
||||||
String parameterName = encryptParamEntry.getKey();
|
String parameterName = encryptParamEntry.getKey();
|
||||||
if (parameterName.startsWith(Constants.ENTITY)) {
|
if (parameterName.startsWith(Constants.ENTITY)) {
|
||||||
// 兼容 MyBatis Plus 封装的 update 相关方法,updateById、update
|
// 兼容 MyBatis Plus 封装的 update 相关方法,updateById、update
|
||||||
Object entity = parameterMap.getOrDefault(parameterName, null);
|
Object entity = parameterMap.getOrDefault(parameterName, null);
|
||||||
this.doEncrypt(this.getEncryptFields(entity), entity);
|
this.doEncrypt(this.getEncryptFields(entity), entity);
|
||||||
|
} else if (parameterName.startsWith(Constants.WRAPPER)) {
|
||||||
|
// 处理参数为 Wrapper 的情况
|
||||||
|
Wrapper wrapper = (Wrapper)parameterMap.getOrDefault(parameterName, null);
|
||||||
|
this.doEncrypt(wrapper, mappedStatement);
|
||||||
} else {
|
} else {
|
||||||
FieldEncrypt fieldEncrypt = encryptParamEntry.getValue();
|
FieldEncrypt fieldEncrypt = encryptParamEntry.getValue();
|
||||||
parameterMap.put(parameterName, this.doEncrypt(parameterMap.get(parameterName), fieldEncrypt));
|
parameterMap.put(parameterName, this.doEncrypt(parameterMap.get(parameterName), fieldEncrypt));
|
||||||
@@ -113,6 +128,69 @@ public class MyBatisEncryptInterceptor extends AbstractMyBatisInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理加密
|
||||||
|
*
|
||||||
|
* @param fieldList 加密字段列表
|
||||||
|
* @param entity 实体
|
||||||
|
* @throws Exception /
|
||||||
|
*/
|
||||||
|
private void doEncrypt(List<Field> fieldList, Object entity) throws Exception {
|
||||||
|
for (Field field : fieldList) {
|
||||||
|
IEncryptor encryptor = super.getEncryptor(field.getAnnotation(FieldEncrypt.class));
|
||||||
|
Object fieldValue = ReflectUtil.getFieldValue(entity, field);
|
||||||
|
// 优先获取自定义对称加密算法密钥,获取不到时再获取全局配置
|
||||||
|
String password = ObjectUtil.defaultIfBlank(field.getAnnotation(FieldEncrypt.class).password(), properties
|
||||||
|
.getPassword());
|
||||||
|
String ciphertext = encryptor.encrypt(fieldValue.toString(), password, properties.getPublicKey());
|
||||||
|
ReflectUtil.setFieldValue(entity, field, ciphertext);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理 Wrapper 加密
|
||||||
|
*
|
||||||
|
* @param wrapper Wrapper 对象
|
||||||
|
* @param mappedStatement 映射语句
|
||||||
|
* @throws Exception /
|
||||||
|
*/
|
||||||
|
private void doEncrypt(Wrapper wrapper, MappedStatement mappedStatement) throws Exception {
|
||||||
|
if (wrapper instanceof AbstractWrapper abstractWrapper) {
|
||||||
|
String sqlSet = abstractWrapper.getSqlSet();
|
||||||
|
if (CharSequenceUtil.isEmpty(sqlSet)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String className = CharSequenceUtil.subBefore(mappedStatement.getId(), StringConstants.DOT, true);
|
||||||
|
Class<?> mapperClass = Class.forName(className);
|
||||||
|
Optional<Class> baseMapperGenerics = getEntityTypeByMapperClass(mapperClass, Optional.empty());
|
||||||
|
// 获取不到泛型对象 则不进行下面的逻辑
|
||||||
|
if (baseMapperGenerics.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
TableInfo tableInfo = TableInfoHelper.getTableInfo(baseMapperGenerics.get());
|
||||||
|
List<TableFieldInfo> fieldList = tableInfo.getFieldList();
|
||||||
|
// 将 name=#{ew.paramNameValuePairs.xxx},age=#{ew.paramNameValuePairs.xxx} 切出来
|
||||||
|
for (String sqlFragment : sqlSet.split(Constants.COMMA)) {
|
||||||
|
String columnName = sqlFragment.split(Constants.EQUALS)[0];
|
||||||
|
// 截取其中的 xxx 字符,例如:#{ew.paramNameValuePairs.xxx}
|
||||||
|
String paramNameVal = sqlFragment.split(Constants.EQUALS)[1].substring(25, sqlFragment
|
||||||
|
.split(Constants.EQUALS)[1].length() - 1);
|
||||||
|
Optional<TableFieldInfo> fieldInfo = fieldList.stream()
|
||||||
|
.filter(f -> f.getColumn().equals(columnName))
|
||||||
|
.findAny();
|
||||||
|
if (fieldInfo.isPresent()) {
|
||||||
|
TableFieldInfo tableFieldInfo = fieldInfo.get();
|
||||||
|
FieldEncrypt fieldEncrypt = tableFieldInfo.getField().getAnnotation(FieldEncrypt.class);
|
||||||
|
if (fieldEncrypt != null) {
|
||||||
|
Map<String, Object> paramNameValuePairs = abstractWrapper.getParamNameValuePairs();
|
||||||
|
paramNameValuePairs.put(paramNameVal, this.doEncrypt(paramNameValuePairs
|
||||||
|
.get(paramNameVal), fieldEncrypt));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理加密
|
* 处理加密
|
||||||
*
|
*
|
||||||
@@ -131,21 +209,38 @@ public class MyBatisEncryptInterceptor extends AbstractMyBatisInterceptor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理加密
|
* 从 Mapper 获取泛型
|
||||||
*
|
*
|
||||||
* @param fieldList 加密字段列表
|
* @param mapperClass Mapper class
|
||||||
* @param entity 实体
|
* @param tempResult 临时存储的泛型对象
|
||||||
* @throws Exception /
|
* @return 泛型
|
||||||
*/
|
*/
|
||||||
private void doEncrypt(List<Field> fieldList, Object entity) throws Exception {
|
private static Optional<Class> getEntityTypeByMapperClass(Class<?> mapperClass, Optional<Class> tempResult) {
|
||||||
for (Field field : fieldList) {
|
Type[] genericInterfaces = mapperClass.getGenericInterfaces();
|
||||||
IEncryptor encryptor = super.getEncryptor(field.getAnnotation(FieldEncrypt.class));
|
Optional<Class> result = tempResult;
|
||||||
Object fieldValue = ReflectUtil.getFieldValue(entity, field);
|
for (Type genericInterface : genericInterfaces) {
|
||||||
// 优先获取自定义对称加密算法密钥,获取不到时再获取全局配置
|
if (genericInterface instanceof ParameterizedType parameterizedType) {
|
||||||
String password = ObjectUtil.defaultIfBlank(field.getAnnotation(FieldEncrypt.class).password(), properties
|
Type rawType = parameterizedType.getRawType();
|
||||||
.getPassword());
|
Type[] actualTypeArguments = parameterizedType.getActualTypeArguments();
|
||||||
String ciphertext = encryptor.encrypt(fieldValue.toString(), password, properties.getPublicKey());
|
// 如果匹配上 BaseMapper 且泛型参数是 Class 类型,则直接返回
|
||||||
ReflectUtil.setFieldValue(entity, field, ciphertext);
|
if (rawType.equals(BaseMapper.class)) {
|
||||||
|
return actualTypeArguments[0] instanceof Class
|
||||||
|
? Optional.of((Class)actualTypeArguments[0])
|
||||||
|
: result;
|
||||||
|
} else if (rawType instanceof Class interfaceClass) {
|
||||||
|
// 如果泛型参数是 Class 类型,则传递给递归调用
|
||||||
|
if (actualTypeArguments[0] instanceof Class tempResultClass) {
|
||||||
|
result = Optional.of(tempResultClass);
|
||||||
|
}
|
||||||
|
// 递归调用,继续查找
|
||||||
|
Optional<Class> innerResult = getEntityTypeByMapperClass(interfaceClass, result);
|
||||||
|
if (innerResult.isPresent()) {
|
||||||
|
return innerResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// 如果没有找到,返回传递进来的 tempResult
|
||||||
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
|
|||||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||||
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
|
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
|
||||||
import org.springframework.web.multipart.MaxUploadSizeExceededException;
|
import org.springframework.web.multipart.MultipartException;
|
||||||
import top.continew.starter.core.constant.StringConstants;
|
import top.continew.starter.core.constant.StringConstants;
|
||||||
import top.continew.starter.core.exception.BadRequestException;
|
import top.continew.starter.core.exception.BadRequestException;
|
||||||
import top.continew.starter.core.exception.BusinessException;
|
import top.continew.starter.core.exception.BusinessException;
|
||||||
@@ -108,11 +108,29 @@ public class GlobalExceptionHandler {
|
|||||||
/**
|
/**
|
||||||
* 拦截文件上传异常-超过上传大小限制
|
* 拦截文件上传异常-超过上传大小限制
|
||||||
*/
|
*/
|
||||||
@ExceptionHandler(MaxUploadSizeExceededException.class)
|
@ExceptionHandler(MultipartException.class)
|
||||||
public R<Void> handleMaxUploadSizeExceededException(MaxUploadSizeExceededException e, HttpServletRequest request) {
|
public R<Void> handleRequestTooBigException(MultipartException e, HttpServletRequest request) {
|
||||||
log.warn("请求地址 [{}],上传文件失败,文件大小超过限制。", request.getRequestURI(), e);
|
String msg = e.getMessage();
|
||||||
String sizeLimit = CharSequenceUtil.subBetween(e.getMessage(), "The maximum size ", " for");
|
R<Void> defaultFail = R.fail(HttpStatus.BAD_REQUEST.value(), msg);
|
||||||
|
if (CharSequenceUtil.isBlank(msg)) {
|
||||||
|
return defaultFail;
|
||||||
|
}
|
||||||
|
|
||||||
|
String sizeLimit;
|
||||||
|
Throwable cause = e.getCause();
|
||||||
|
if (null != cause) {
|
||||||
|
msg = msg.concat(cause.getMessage().toLowerCase());
|
||||||
|
}
|
||||||
|
if (msg.contains("size") && msg.contains("exceed")) {
|
||||||
|
sizeLimit = CharSequenceUtil.subBetween(msg, "maximum (", ")");
|
||||||
|
} else if (msg.contains("larger than")) {
|
||||||
|
sizeLimit = CharSequenceUtil.subAfter(msg, "larger than ", true);
|
||||||
|
} else {
|
||||||
|
return defaultFail;
|
||||||
|
}
|
||||||
|
|
||||||
String errorMsg = "请上传小于 %sMB 的文件".formatted(NumberUtil.parseLong(sizeLimit) / 1024 / 1024);
|
String errorMsg = "请上传小于 %sMB 的文件".formatted(NumberUtil.parseLong(sizeLimit) / 1024 / 1024);
|
||||||
|
log.warn("请求地址 [{}],上传文件失败,文件大小超过限制。", request.getRequestURI(), e);
|
||||||
return R.fail(HttpStatus.BAD_REQUEST.value(), errorMsg);
|
return R.fail(HttpStatus.BAD_REQUEST.value(), errorMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
8
pom.xml
8
pom.xml
@@ -19,7 +19,7 @@
|
|||||||
ContiNew Starter 包含了一系列经过企业实践优化的依赖包(如 MyBatis-Plus、SaToken),
|
ContiNew Starter 包含了一系列经过企业实践优化的依赖包(如 MyBatis-Plus、SaToken),
|
||||||
可轻松集成到应用中,为开发人员减少手动引入依赖及配置的麻烦,为 Spring Boot Web 项目的灵活快速构建提供支持。
|
可轻松集成到应用中,为开发人员减少手动引入依赖及配置的麻烦,为 Spring Boot Web 项目的灵活快速构建提供支持。
|
||||||
</description>
|
</description>
|
||||||
<url>https://github.com/Charles7c/continew-starter</url>
|
<url>https://github.com/continew-org/continew-starter</url>
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
||||||
@@ -40,9 +40,9 @@
|
|||||||
</developer>
|
</developer>
|
||||||
</developers>
|
</developers>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:Charles7c/continew-starter.git</connection>
|
<connection>scm:git:git@github.com:continew-org/continew-starter.git</connection>
|
||||||
<developerConnection>scm:git:git@github.com:Charles7c/continew-starter.git</developerConnection>
|
<developerConnection>scm:git:git@github.com:continew-org/continew-starter.git</developerConnection>
|
||||||
<url>https://github.com/Charles7c/continew-starter</url>
|
<url>https://github.com/continew-org/continew-starter</url>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
Reference in New Issue
Block a user