diff --git a/README.md b/README.md index 8d0401a..5a08870 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ - **项目名称**:xtools-boot - **项目版本**:5.0.0 - **父POM**:org.xujun:xtools-parent-boot:5.0.0 -- **项目定位**:低调大师工具箱,SpringBoot工具模块,适配JDK25。提供企业级应用开发所需的通用功能模块,涵盖缓存、数据库、搜索、消息队列、任务调度、日志、存储、脱敏等核心能力,以Spring Boot Starter形式封装,支持按需引入。 +- **项目定位**:低调大师工具箱,SpringBoot工具模块,适配JDK25。提供企业级应用开发所需的通用功能模块,涵盖缓存、数据库、搜索、消息队列、任务调度、日志、存储、脱敏等核心能力,以Spring + Boot Starter形式封装,支持按需引入。 ### 1.2 技术特点 @@ -152,36 +153,25 @@ graph LR Client[客户端请求] --> Web[xtools-boot-web] Web --> Filter[请求过滤器] Filter --> LogTrack[日志链路追踪] - LogTrack --> Log[xtools-boot-log] Log --> LogBus[LogBus日志总线] - Web --> Controller[业务Controller] Controller --> Cache[xtools-boot-cache] Controller --> DB[xtools-boot-db] - Cache --> Redis[Redis] DB --> MySQL[MySQL] - Controller --> MQ[xtools-boot-mq] MQ --> RabbitMQ[RabbitMQ] - MQ --> Thread[xtools-boot-thread] Thread --> VThread[虚拟线程] - Controller --> Task[xtools-boot-task] Task --> TaskBus[TaskBus任务总线] - Job[xtools-boot-job] --> XXLJob[XXL-JOB] - Controller --> ES[xtools-boot-elasticsearch] ES --> Elasticsearch[Elasticsearch] - Controller --> Storage[xtools-boot-storage] Storage --> File[本地文件/S3] - Controller --> Mask[xtools-boot-mask] - Log --> Doc[xtools-boot-knife4j] ``` @@ -193,36 +183,27 @@ graph LR graph TD App[xtools-boot
父模块] --> API[xtools-boot-api
API定义模块] App --> Core[xtools-boot-core
核心工具模块] - App --> DB[xtools-boot-db
数据库模块] App --> Cache[xtools-boot-cache
缓存模块] App --> ES[xtools-boot-elasticsearch
搜索引擎模块] - App --> MQ[xtools-boot-mq
消息队列模块] App --> Task[xtools-boot-task
任务管理模块] App --> Job[xtools-boot-job
任务调度模块] App --> Thread[xtools-boot-thread
线程管理模块] - App --> Log[xtools-boot-log
日志模块] App --> Web[xtools-boot-web
Web模块] App --> Knife4j[xtools-boot-knife4j
API文档模块] App --> IP[xtools-boot-ip
IP定位模块] App --> Mask[xtools-boot-mask
数据脱敏模块] App --> Storage[xtools-boot-storage
存储模块] - DB --> DBMybatis[xtools-boot-db-mybatis] DB --> DBMP[xtools-boot-db-mybatis-plus] - Cache --> CacheRedis[xtools-boot-cache-redis] - MQ --> MQBase[xtools-boot-mq-base] MQ --> MQRabbit[xtools-boot-mq-rabbit] - Job --> JobXXL[xtools-boot-job-xxl] - Web --> WebBase[xtools-boot-web-base] Web --> WebFilter[xtools-boot-web-filter] - Storage --> StorageBase[xtools-boot-storage-base] Storage --> StorageFile[xtools-boot-storage-file] Storage --> StorageS3[xtools-boot-storage-s3] @@ -277,28 +258,28 @@ flowchart TB ### 2.3 模块职责 -| 模块 | 职责 | 核心类 | -|------|------|--------| -| xtools-boot-api | API定义层,提供基础实体、枚举、异常、日志链路等公共定义 | BaseEntity、BaseEnum、BizError、LogTrack | -| xtools-boot-core | 核心工具层,提供Spring上下文、树形结构、枚举等通用工具 | SpringContextUtils、TreeUtils、EnumUtils | -| xtools-boot-db-mybatis | MyBatis集成,提供数据库访问、监控、慢查询检测 | MyBatisConfig、MySqlMonitor | -| xtools-boot-db-mybatis-plus | MyBatis-Plus集成,提供分页插件、查询工具 | MybatisPlusConfig、QueryUtils | -| xtools-boot-cache-redis | Redis缓存,提供缓存操作、监控 | RedisUtils、RedisMonitor | -| xtools-boot-elasticsearch | ES集成,提供搜索、查询、集群监控 | EsUtils、EsQueryUtils、ElasticsearchMonitor | -| xtools-boot-mq-base | 消息总线,提供消息发布、处理、错误处理 | MqBus、BaseMqHandle、BaseErrorHandle | -| xtools-boot-mq-rabbit | RabbitMQ实现,提供消息监听、消费 | BootRabbitMqConfiguration | -| xtools-boot-task | 任务管理,提供任务总线、状态追踪 | TaskBus、TaskInfo、TaskStatus | -| xtools-boot-job-xxl | XXL-JOB集成,提供分布式任务调度 | BootXxlJobConfiguration、InitXxlJob | -| xtools-boot-thread | 线程管理,提供虚拟线程、回调机制 | BootThreadConfiguration | -| xtools-boot-log | 日志模块,提供日志总线、链路追踪 | LogBus、LogTrackHolder、LogBody | -| xtools-boot-web-base | Web基础,提供MVC配置、过滤器、转换器 | BootWebBaseConfiguration、CommonFilter | -| xtools-boot-web-filter | Web过滤器,提供过滤器扫描注册 | BootWebFilterConfiguration | -| xtools-boot-knife4j | API文档,提供Knife4j/OpenAPI3集成 | BootKnife4jConfiguration | -| xtools-boot-ip | IP定位,提供离线IP地址查询 | BootIpConfiguration | -| xtools-boot-mask | 数据脱敏,提供注解式敏感数据处理 | DefaultMaskHandle、MaskType | -| xtools-boot-storage-base | 存储基础,提供统一存储接口 | StorageService | -| xtools-boot-storage-file | 文件存储,提供本地文件系统存储 | StorageServiceFileImpl | -| xtools-boot-storage-s3 | S3存储,提供AWS S3对象存储 | BootStorageS3Configuration | +| 模块 | 职责 | 核心类 | +|-----------------------------|--------------------------------|-------------------------------------------| +| xtools-boot-api | API定义层,提供基础实体、枚举、异常、日志链路等公共定义 | BaseEntity、BaseEnum、BizError、LogTrack | +| xtools-boot-core | 核心工具层,提供Spring上下文、树形结构、枚举等通用工具 | SpringContextUtils、TreeUtils、EnumUtils | +| xtools-boot-db-mybatis | MyBatis集成,提供数据库访问、监控、慢查询检测 | MyBatisConfig、MySqlMonitor | +| xtools-boot-db-mybatis-plus | MyBatis-Plus集成,提供分页插件、查询工具 | MybatisPlusConfig、QueryUtils | +| xtools-boot-cache-redis | Redis缓存,提供缓存操作、监控 | RedisUtils、RedisMonitor | +| xtools-boot-elasticsearch | ES集成,提供搜索、查询、集群监控 | EsUtils、EsQueryUtils、ElasticsearchMonitor | +| xtools-boot-mq-base | 消息总线,提供消息发布、处理、错误处理 | MqBus、BaseMqHandle、BaseErrorHandle | +| xtools-boot-mq-rabbit | RabbitMQ实现,提供消息监听、消费 | BootRabbitMqConfiguration | +| xtools-boot-task | 任务管理,提供任务总线、状态追踪 | TaskBus、TaskInfo、TaskStatus | +| xtools-boot-job-xxl | XXL-JOB集成,提供分布式任务调度 | BootXxlJobConfiguration、InitXxlJob | +| xtools-boot-thread | 线程管理,提供虚拟线程、回调机制 | BootThreadConfiguration | +| xtools-boot-log | 日志模块,提供日志总线、链路追踪 | LogBus、LogTrackHolder、LogBody | +| xtools-boot-web-base | Web基础,提供MVC配置、过滤器、转换器 | BootWebBaseConfiguration、CommonFilter | +| xtools-boot-web-filter | Web过滤器,提供过滤器扫描注册 | BootWebFilterConfiguration | +| xtools-boot-knife4j | API文档,提供Knife4j/OpenAPI3集成 | BootKnife4jConfiguration | +| xtools-boot-ip | IP定位,提供离线IP地址查询 | BootIpConfiguration | +| xtools-boot-mask | 数据脱敏,提供注解式敏感数据处理 | DefaultMaskHandle、MaskType | +| xtools-boot-storage-base | 存储基础,提供统一存储接口 | StorageService | +| xtools-boot-storage-file | 文件存储,提供本地文件系统存储 | StorageServiceFileImpl | +| xtools-boot-storage-s3 | S3存储,提供AWS S3对象存储 | BootStorageS3Configuration | ### 2.4 包结构设计 @@ -334,42 +315,33 @@ graph LR API --> WebCore[xtools-web] Core[xtools-boot-core] --> API Core --> Extend - DBMybatis[xtools-boot-db-mybatis] --> Core DBMybatis --> Log[xtools-boot-log] DBMybatis --> Thread[xtools-boot-thread] DBMP[xtools-boot-db-mybatis-plus] --> Core - CacheRedis[xtools-boot-cache-redis] --> Core - ES[xtools-boot-elasticsearch] --> Extend ES --> Core ES --> Log - MQBase[xtools-boot-mq-base] --> Core MQBase --> Log MQBase --> Thread MQRabbit[xtools-boot-mq-rabbit] --> Core MQRabbit --> MQBase - Task[xtools-boot-task] --> Core JobXXL[xtools-boot-job-xxl] --> Core - Log --> Core Thread --> Core IP[xtools-boot-ip] --> Extend IP --> Core - Knife4j[xtools-boot-knife4j] --> Core Mask[xtools-boot-mask] --> Core - StorageBase[xtools-boot-storage-base] --> Core StorageFile[xtools-boot-storage-file] --> Core StorageFile --> StorageBase StorageS3[xtools-boot-storage-s3] --> Extend StorageS3 --> Core StorageS3 --> StorageBase - WebBase[xtools-boot-web-base] --> WebCore WebBase --> Core WebBase --> Log @@ -393,6 +365,7 @@ flowchart TD ``` **自动配置设计**: + - 每个模块通过 `META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports` 注册自动配置类 - 配置类通过 `@Import(XXXImportSelector.class)` 导入自定义选择器 - 选择器实现 `ImportBeanDefinitionRegistrar` 接口,按包名扫描注册Bean @@ -406,7 +379,6 @@ flowchart TD A[BaseEnum接口] --> B[int code
枚举编码] A --> C[String desc
枚举描述] A --> D["BaseEnum[] all()
获取所有枚举"] - B --> E[StatusEnum
状态枚举] B --> F[DeleteEnum
删除枚举] B --> G[ThreadType
线程类型] @@ -418,6 +390,7 @@ flowchart TD ``` **枚举规范**: + - 所有业务枚举实现 `BaseEnum` 接口 - 提供 `code()` 和 `desc()` 方法 - 提供静态 `valueOf(int code)` 和 `valueOfDesc(String desc)` 方法 @@ -431,12 +404,10 @@ flowchart TD A --> C[BizWarning
业务警告] A --> D[UnauthorizedError
未授权异常] A --> E[BizPublicKeyError
公钥异常] - F[BootError
错误码枚举] --> F1[code
错误编码] F --> F2[type
错误类型] F --> F3[module
所属模块] F --> F4[messageTemplate
消息模板] - G[BootErrorModule
错误模块枚举] --> G1[API
API模块] G --> G2[CORE
核心模块] G --> G3[LOG
日志模块] @@ -444,6 +415,7 @@ flowchart TD ``` **异常体系**: + - `CommonException`:基础异常(来自xtools-core) - `BizError`:业务逻辑异常,使用错误码和消息模板 - `BizWarning`:业务警告异常 @@ -466,7 +438,6 @@ flowchart TD C --> C6[stackTrace
堆栈信息] C --> C7[logData
日志数据] C --> C8[err
异常文本] - B --> D[LogBusInterface实现类
日志处理器] D --> E[写入Elasticsearch] D --> F[写入数据库] @@ -487,6 +458,7 @@ flowchart LR ``` **日志功能**: + - **LogBus**:日志总线,统一的日志创建和管理入口 - **LogTrack**:链路追踪信息,包含traceId、spanId、线程类型等 - **HolderLogTrack**:线程持有者的链路追踪,支持主子线程传递 @@ -516,6 +488,7 @@ flowchart TD ``` **消息队列功能**: + - **MqBus**:消息总线,统一的消息发布入口 - **BaseMqHandle**:消息处理基类,定义消息处理模板 - **BaseErrorHandle**:错误处理基类,定义错误处理策略 @@ -542,6 +515,7 @@ flowchart TD ``` **任务管理功能**: + - **TaskBus**:任务总线,提供Builder模式创建和管理任务 - **TaskInfo**:任务信息,包含任务类型、任务数据、状态等 - **TaskStatus**:任务状态枚举(ING、SUCCESS、ERROR) @@ -562,6 +536,7 @@ flowchart TD ``` **任务调度功能**: + - **BootXxlJobConfiguration**:XXL-JOB自动配置 - **InitXxlJob**:XXL-JOB初始化,自动扫描和注册任务处理器 - **JobInterface**:任务执行接口,定义任务执行契约 @@ -574,16 +549,15 @@ flowchart TD flowchart TD A[BootThreadConfiguration
线程配置] --> B[虚拟线程支持] A --> C[VirtualThreadTaskCallback
虚拟线程任务回调] - B --> D[MQ消息消费使用虚拟线程] B --> E[异步任务使用虚拟线程] - C --> F[任务执行前回调] C --> G[任务执行后回调] C --> H[异常处理回调] ``` **线程管理功能**: + - **BootThreadConfiguration**:线程配置,注册虚拟线程相关Bean - **VirtualThreadTaskCallback**:虚拟线程任务回调接口,提供执行前、执行后、异常处理回调 - 支持在消息消费和异步任务中使用虚拟线程 @@ -603,6 +577,7 @@ flowchart LR ``` **缓存功能**: + - **BootCacheRedisConfiguration**:Redis自动配置 - **RedisUtils**:Redis工具类,封装常用Redis操作 - **RedisMonitor**:Redis监控,提供缓存统计和健康检查 @@ -631,6 +606,7 @@ flowchart TD ``` **数据库功能**: + - **MyBatisConfig**:MyBatis核心配置 - **MybatisPlusConfig**:MyBatis-Plus配置,注册分页插件 - **QueryUtils**:查询工具类,提供时间范围过滤等通用查询方法 @@ -645,15 +621,12 @@ flowchart TD flowchart TD A[业务代码] --> B[EsUtils
ES HTTP工具] A --> C[EsQueryUtils
ES查询工具] - B --> D[索引操作] B --> E[文档操作] B --> F[集群操作] - C --> G[构建查询] C --> H[聚合查询] C --> I[分页查询] - J[ElasticsearchMonitor
ES监控] --> K[集群健康] J --> L[索引状态] J --> M[节点信息] @@ -661,6 +634,7 @@ flowchart TD ``` **搜索引擎功能**: + - **BootElasticsearchConfiguration**:ES自动配置 - **EsUtils**:Elasticsearch HTTP客户端工具,提供索引、文档、集群操作 - **EsQueryUtils**:ES查询工具,提供通用查询构建 @@ -680,7 +654,6 @@ flowchart TD B --> B6[PASSWORD
密码] B --> B7[ADDRESS
地址] B --> B8[CUSTOM
自定义] - A --> C["配置参数
prefixNoMaskLen
suffixNoMaskLen
maskChar"] C --> D[DefaultMaskHandle
默认脱敏处理] D --> E[MaskCustom
自定义脱敏接口] @@ -688,6 +661,7 @@ flowchart TD ``` **数据脱敏功能**: + - **BootMaskConfiguration**:脱敏模块自动配置 - **MaskType**:脱敏类型枚举,支持8种内置类型 - **DefaultMaskHandle**:默认脱敏处理器,根据类型自动脱敏 @@ -703,13 +677,10 @@ flowchart TD A --> A2[save
保存文件] A --> A3[get
获取文件] A --> A4[del
删除文件] - B[StorageServiceFileImpl
文件存储实现] --> C[本地文件系统] D[BootStorageS3Configuration
S3存储配置] --> E[AWS S3] - F["@ConditionalOnProperty
storage.type=file"] --> B G["@ConditionalOnProperty
storage.type=s3"] --> D - A2 --> A2a[bucket
桶名称] A2 --> A2b[fileName
文件名] A2 --> A2c[inputStream
输入流] @@ -717,6 +688,7 @@ flowchart TD ``` **存储功能**: + - **StorageService**:统一存储接口,定义exists、save、get、del操作 - **BootStorageBaseConfiguration**:存储基础配置 - **StorageServiceFileImpl**:本地文件系统存储实现 @@ -730,15 +702,12 @@ flowchart TD flowchart TD A[xtools-boot-web] --> B[xtools-boot-web-base] A --> C[xtools-boot-web-filter] - B --> B1[BootWebBaseConfiguration
Web基础配置] B --> B2[CommonFilter
通用过滤器] B --> B3[MvcConverterConfig
MVC转换器配置] B --> B4[LogTrackConfig
日志链路配置] - C --> C1[BootWebFilterConfiguration
过滤器配置] C --> C2[BootWebFilterImportSelector
过滤器导入选择器] - B4 --> D[生成LogTrack] D --> E[绑定到ThreadLocal] E --> F[请求处理] @@ -746,6 +715,7 @@ flowchart TD ``` **Web模块功能**: + - **BootWebBaseConfiguration**:Web基础配置,集成xtools-web - **CommonFilter**:通用请求过滤器,处理请求上下文 - **MvcConverterConfig**:MVC转换器配置 @@ -773,42 +743,42 @@ flowchart TD **类命名**: -| 类型 | 命名规则 | 示例 | -|------|----------|------| -| 配置类 | Boot{Module}Configuration | BootCoreConfiguration | -| 导入选择器 | Boot{Module}ImportSelector | BootCoreImportSelector | -| 工具类 | {功能}Utils | SpringContextUtils | -| 监控类 | {组件}Monitor | MySqlMonitor | -| 枚举类 | {功能}Enum / {功能}Enums | StatusEnum、MySqlMonitorEnums | -| 异常类 | Biz{类型}Error | BizError、BizWarning | -| 接口 | Base{类型} / {功能}Interface / {功能}Type | BaseEnum、LogBusInterface、BaseTaskType | -| DTO类 | {功能}Dto / {功能}Info / {功能}Body | MessageDto、TaskInfo、LogBody | -| 回调类 | {功能}Callback | VirtualThreadTaskCallback | -| 初始化类 | Init{功能} | InitMq、InitXxlJob | -| 处理器 | {功能}Handle / Default{功能}Handle | BaseMqHandle、DefaultMaskHandle | +| 类型 | 命名规则 | 示例 | +|-------|-------------------------------------|---------------------------------------| +| 配置类 | Boot{Module}Configuration | BootCoreConfiguration | +| 导入选择器 | Boot{Module}ImportSelector | BootCoreImportSelector | +| 工具类 | {功能}Utils | SpringContextUtils | +| 监控类 | {组件}Monitor | MySqlMonitor | +| 枚举类 | {功能}Enum / {功能}Enums | StatusEnum、MySqlMonitorEnums | +| 异常类 | Biz{类型}Error | BizError、BizWarning | +| 接口 | Base{类型} / {功能}Interface / {功能}Type | BaseEnum、LogBusInterface、BaseTaskType | +| DTO类 | {功能}Dto / {功能}Info / {功能}Body | MessageDto、TaskInfo、LogBody | +| 回调类 | {功能}Callback | VirtualThreadTaskCallback | +| 初始化类 | Init{功能} | InitMq、InitXxlJob | +| 处理器 | {功能}Handle / Default{功能}Handle | BaseMqHandle、DefaultMaskHandle | **方法命名**: -| 操作 | 命名规则 | 示例 | -|------|----------|------| -| 查询 | get / find / query | getBean、findById、queryList | -| 创建 | create / save / publish | createLog、save、publish | -| 删除 | delete / del / remove | deleteById、del | -| 判断 | is / has / exists | exists、isValid | -| 转换 | to / convert / of | valueOf、convert | -| 初始化 | init | init | -| 加载 | load | loadSuccess | -| 执行 | execute / run | execute | +| 操作 | 命名规则 | 示例 | +|-----|-------------------------|----------------------------| +| 查询 | get / find / query | getBean、findById、queryList | +| 创建 | create / save / publish | createLog、save、publish | +| 删除 | delete / del / remove | deleteById、del | +| 判断 | is / has / exists | exists、isValid | +| 转换 | to / convert / of | valueOf、convert | +| 初始化 | init | init | +| 加载 | load | loadSuccess | +| 执行 | execute / run | execute | **变量命名**: -| 类型 | 命名规则 | 示例 | -|------|----------|------| -| 普通变量 | camelCase | logTrack、taskInfo | -| 常量 | UPPER_SNAKE_CASE | CP_NUM0、CP_NUM50 | -| Boolean | is/has前缀 | isValid、hasChildren | -| 集合 | 复数形式 | items、list | -| 配置属性 | camelCase | prefixNoMaskLen、maskChar | +| 类型 | 命名规则 | 示例 | +|---------|------------------|--------------------------| +| 普通变量 | camelCase | logTrack、taskInfo | +| 常量 | UPPER_SNAKE_CASE | CP_NUM0、CP_NUM50 | +| Boolean | is/has前缀 | isValid、hasChildren | +| 集合 | 复数形式 | items、list | +| 配置属性 | camelCase | prefixNoMaskLen、maskChar | ### 4.2 注释规范 @@ -880,131 +850,131 @@ private String fieldName; ### 5.1 核心框架依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| -| Spring Boot | 4.0.5 | 应用框架 | -| Spring Framework | 7.0.6 | 核心框架 | -| Spring Security | 7.0.4 | 安全框架 | -| Spring AMQP | 4.0.2 | RabbitMQ集成 | -| Spring Data BOM | 2025.1.4 | Spring Data版本管理 | -| Spring Data Redis | 4.0.4 | Redis集成 | -| Spring Data Elasticsearch | 6.0.4 | Elasticsearch集成 | -| Jakarta Servlet | 6.1.0 | Servlet API | -| Jakarta Validation | 3.1.1 | 参数校验 | +| 依赖 | 版本 | 用途 | +|---------------------------|----------|-----------------| +| Spring Boot | 4.0.5 | 应用框架 | +| Spring Framework | 7.0.6 | 核心框架 | +| Spring Security | 7.0.4 | 安全框架 | +| Spring AMQP | 4.0.2 | RabbitMQ集成 | +| Spring Data BOM | 2025.1.4 | Spring Data版本管理 | +| Spring Data Redis | 4.0.4 | Redis集成 | +| Spring Data Elasticsearch | 6.0.4 | Elasticsearch集成 | +| Jakarta Servlet | 6.1.0 | Servlet API | +| Jakarta Validation | 3.1.1 | 参数校验 | ### 5.2 数据库相关依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| -| MyBatis Spring Boot Starter | 4.0.1 | MyBatis集成 | -| MyBatis-Plus | 3.5.16 | ORM增强工具 | -| Druid | 1.2.28 | 数据库连接池 | +| 依赖 | 版本 | 用途 | +|-----------------------------|--------|-----------| +| MyBatis Spring Boot Starter | 4.0.1 | MyBatis集成 | +| MyBatis-Plus | 3.5.16 | ORM增强工具 | +| Druid | 1.2.28 | 数据库连接池 | ### 5.3 搜索引擎依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| +| 依赖 | 版本 | 用途 | +|----------------------|-------|------------| | Elasticsearch Client | 9.2.6 | ES Java客户端 | ### 5.4 消息队列依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| +| 依赖 | 版本 | 用途 | +|----------------------|--------|------------------| | RabbitMQ AMQP Client | 5.27.1 | RabbitMQ Java客户端 | ### 5.5 缓存依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| -| Lettuce | 6.8.2.RELEASE | Redis客户端 | -| Caffeine | 3.2.3 | 本地缓存 | +| 依赖 | 版本 | 用途 | +|----------|---------------|----------| +| Lettuce | 6.8.2.RELEASE | Redis客户端 | +| Caffeine | 3.2.3 | 本地缓存 | ### 5.6 工具库依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| -| Lombok | 1.18.44 | 代码简化 | -| MapStruct | 1.6.3 | 对象映射 | -| FastJSON2 | 2.0.60 | JSON处理 | -| Velocity | 2.4.1 | 模板引擎 | -| Jackson BOM | 3.1.0 | JSON处理 | -| Commons Lang3 | 3.20.0 | 通用工具 | -| Commons IO | 2.21.0 | IO工具 | -| Commons Text | 1.15.0 | 文本处理 | -| AspectJ Weaver | 1.9.25.1 | AOP支持 | +| 依赖 | 版本 | 用途 | +|----------------|----------|--------| +| Lombok | 1.18.44 | 代码简化 | +| MapStruct | 1.6.3 | 对象映射 | +| FastJSON2 | 2.0.60 | JSON处理 | +| Velocity | 2.4.1 | 模板引擎 | +| Jackson BOM | 3.1.0 | JSON处理 | +| Commons Lang3 | 3.20.0 | 通用工具 | +| Commons IO | 2.21.0 | IO工具 | +| Commons Text | 1.15.0 | 文本处理 | +| AspectJ Weaver | 1.9.25.1 | AOP支持 | ### 5.7 安全相关依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| -| BouncyCastle | 1.84 | 加密库 | -| Easy Captcha | 1.6.2 | 验证码 | -| java-jwt | 4.5.1 | JWT令牌 | +| 依赖 | 版本 | 用途 | +|--------------|-------|-------| +| BouncyCastle | 1.84 | 加密库 | +| Easy Captcha | 1.6.2 | 验证码 | +| java-jwt | 4.5.1 | JWT令牌 | ### 5.8 文档相关依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| -| Knife4j OpenAPI3 | 4.5.0 | API文档增强 | -| Springdoc OpenAPI | 3.0.3 | OpenAPI 3集成 | -| Swagger Annotations | 2.2.48 | API文档注解 | +| 依赖 | 版本 | 用途 | +|---------------------|--------|-------------| +| Knife4j OpenAPI3 | 4.5.0 | API文档增强 | +| Springdoc OpenAPI | 3.0.3 | OpenAPI 3集成 | +| Swagger Annotations | 2.2.48 | API文档注解 | ### 5.9 任务调度依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| +| 依赖 | 版本 | 用途 | +|--------------|-------|---------| | XXL-JOB Core | 3.4.0 | 分布式任务调度 | ### 5.10 系统监控依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| -| OSHI Core | 6.11.1 | 系统监控 | -| ip2region | 3.3.7 | IP地址定位 | +| 依赖 | 版本 | 用途 | +|-----------|--------|--------| +| OSHI Core | 6.11.1 | 系统监控 | +| ip2region | 3.3.7 | IP地址定位 | ### 5.11 存储依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| +| 依赖 | 版本 | 用途 | +|------------|---------|--------| | AWS S3 SDK | 2.42.34 | S3对象存储 | ### 5.12 办公工具依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| +| 依赖 | 版本 | 用途 | +|-------------|------------------|---------| | Fesod Sheet | 2.0.1-incubating | Excel处理 | -| PDFBox | 3.0.7 | PDF处理 | +| PDFBox | 3.0.7 | PDF处理 | ### 5.13 其他工具依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| -| UserAgentUtils | 1.21 | 浏览器标识解析 | -| Pinyin4j | 2.5.1 | 拼音转换 | -| Thumbnailator | 0.4.21 | 图片压缩 | -| mmseg4j-core | 1.10.0 | 中文分词 | -| ZXing | 3.5.4 | 二维码/条形码 | -| Jsoup | 1.22.1 | HTML解析 | -| Hibernate Validator | 9.0.1.Final | 参数校验 | -| Netty | 4.2.12.Final | 网络通信 | +| 依赖 | 版本 | 用途 | +|---------------------|--------------|---------| +| UserAgentUtils | 1.21 | 浏览器标识解析 | +| Pinyin4j | 2.5.1 | 拼音转换 | +| Thumbnailator | 0.4.21 | 图片压缩 | +| mmseg4j-core | 1.10.0 | 中文分词 | +| ZXing | 3.5.4 | 二维码/条形码 | +| Jsoup | 1.22.1 | HTML解析 | +| Hibernate Validator | 9.0.1.Final | 参数校验 | +| Netty | 4.2.12.Final | 网络通信 | ### 5.14 测试依赖 -| 依赖 | 版本 | 用途 | -|------|------|------| +| 依赖 | 版本 | 用途 | +|---------------|-------|------| | JUnit Jupiter | 6.0.3 | 单元测试 | ### 5.15 xtools内部框架依赖 -| 模块 | 版本 | 用途 | -|------|------|------| -| xtools-core | 5.0.0 | 核心工具库 | -| xtools-web | 5.0.0 | Web工具库 | -| xtools-extend | 5.0.0 | 扩展工具库 | -| xtools-api | 5.0.0 | API定义库 | -| xtools-parent-boot | 5.0.0 | Boot父POM | -| xtools-parent | 5.0.0 | 基础父POM | -| xtools-dependencies | 5.0.0 | 依赖管理POM | +| 模块 | 版本 | 用途 | +|---------------------|-------|----------| +| xtools-core | 5.0.0 | 核心工具库 | +| xtools-web | 5.0.0 | Web工具库 | +| xtools-extend | 5.0.0 | 扩展工具库 | +| xtools-api | 5.0.0 | API定义库 | +| xtools-parent-boot | 5.0.0 | Boot父POM | +| xtools-parent | 5.0.0 | 基础父POM | +| xtools-dependencies | 5.0.0 | 依赖管理POM | ## 六、技术选型说明 @@ -1087,20 +1057,20 @@ private String fieldName; ### 6.8 其他重要依赖版本 -| 依赖 | 版本 | 用途 | -|------|------|------| -| FastJSON2 | 2.0.60 | 高性能JSON序列化 | -| Lombok | 1.18.44 | 代码简化 | -| MapStruct | 1.6.3 | 编译期对象映射 | -| Velocity | 2.4.1 | 模板引擎(代码生成) | -| Knife4j | 4.5.0 | API文档增强 | -| BouncyCastle | 1.84 | 国密算法支持 | -| OSHI | 6.11.1 | 系统信息采集 | -| ip2region | 3.3.7 | 离线IP定位 | -| Druid | 1.2.28 | 数据库连接池监控 | -| AWS S3 SDK | 2.42.34 | S3对象存储 | -| Caffeine | 3.2.3 | 高性能本地缓存 | -| Jackson | 3.1.0 | JSON处理 | +| 依赖 | 版本 | 用途 | +|--------------|---------|------------| +| FastJSON2 | 2.0.60 | 高性能JSON序列化 | +| Lombok | 1.18.44 | 代码简化 | +| MapStruct | 1.6.3 | 编译期对象映射 | +| Velocity | 2.4.1 | 模板引擎(代码生成) | +| Knife4j | 4.5.0 | API文档增强 | +| BouncyCastle | 1.84 | 国密算法支持 | +| OSHI | 6.11.1 | 系统信息采集 | +| ip2region | 3.3.7 | 离线IP定位 | +| Druid | 1.2.28 | 数据库连接池监控 | +| AWS S3 SDK | 2.42.34 | S3对象存储 | +| Caffeine | 3.2.3 | 高性能本地缓存 | +| Jackson | 3.1.0 | JSON处理 | ---