# frame-components **Repository Path**: oldsocks/frame-components ## Basic Information - **Project Name**: frame-components - **Description**: 这是一个基于Spring Boot的框架组件集合,是在对一些常用的基础组件进行的二次封装,方便快速搭建业务系统 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-01-10 - **Last Updated**: 2025-08-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Frame Components ## 项目简介 这是一个基于Spring Boot的框架组件集合,包含多个功能模块: - Captcha:验证码生成与验证 - Common:通用工具类与常量 - Datasource:多数据源支持 - Excel:Excel导入导出处理 - Idempotent:幂等性控制 - Lock:本地与分布式锁实现 - Log:操作日志记录 - MyBatis:MyBatis增强功能 - Redis:Redis缓存配置 - Security:安全认证与权限控制 - Sensitive:敏感数据脱敏 - Web:Web基础配置 ## 模块说明 ### frame-component-captcha 验证码生成组件,提供: - 配置类 CaptchaConfig - 数学验证码生成 KaptchaTextCreator - 验证码服务接口 ValidateCodeService - 验证码服务实现 ValidateCodeServiceImpl ### frame-component-common 通用工具组件,包含: - 注解处理(Excel, Xss) - 常量定义(CacheConstants, Constants) - 日期/文件/字符串/类型转换等工具类 - 安全工具类(JwtUtils, SecurityUtils) - 异常处理类(ServiceException, CaptchaException) ### frame-component-datasource 多数据源支持组件: - 注解 @Master 和 @Slave 用于标记数据源 - 基于Dynamic-Datasource实现的动态数据源切换 ### frame-component-excel Excel处理组件: - 基于EasyExcel的导入导出工具 EasyExcelUtil - 批量读取监听 AbstractBatchReadListener ### frame-component-idempotent 幂等性控制组件: - 注解 @Debounce 用于声明幂等方法 - 切面 DebounceAspect 实现幂等逻辑 - 基于Redis的幂等实现 ### frame-component-lock 锁管理组件: - 本地锁和分布式锁统一接口 - 支持JDK和Redisson锁实现 - 提供自动配置类 LockAutoConfiguration - 注解 @Debounce 用于声明锁 ### frame-component-log 操作日志记录组件: - 注解 @Log 用于标记需要记录日志的方法 - 切面 LogAspect 实现日志记录 - 日志存储接口 LogStoreService - 默认实现 DefaultLogStoreService ### frame-component-mybatis MyBatis增强组件: - �基础实体类 BaseEntity - JSON类型处理器 JsonTypeHandler - 分页工具 PageUtil ### frame-component-redis Redis缓存组件: - RedisTemplate配置 - Redis服务封装 RedisService - 自动配置 RedisCacheConfig ### frame-component-security 安全认证组件: - 安全配置 SecurityAutoConfiguration - Token服务 TokenService - 权限检查 AuthorityService - 用户认证 AuthLogic - 异常处理 SecurityExceptionHandler ### frame-component-sensitive 敏感数据脱敏组件: - 字段脱敏注解 @Sensitive - JSON序列化脱敏 SensitiveJsonSerializer - 脱敏工具 DesensitizedUtil ### frame-component-web Web基础组件: - 全局异常处理 GlobalExceptionHandler - 日期时间转换配置 - Swagger文档配置 SwaggerConfig - 自定义属性转换器