pan-common

pan-common是Java Spring Web企业级组件库,通过声明式注解消灭样板代码,内置强大基础工具类底座,配套轻量 HTTP 客户端、JSON 自动适配(Fastjson2/Jackson/Fastjson1)、数据脱敏、国密SM2/SM3/SM4、链式计算及Redis键管理,Java工具集,Spring Boot 2.x / 3.x 兼容,JDK8~21+兼容

Packages 
Package Description
com.gitee.apanlh.annotation
提供工具类各类注解,如以下子包: com.gitee.apanlh.annotation.copy - 对象属性拷贝注解 com.gitee.apanlh.annotation.desensitize - 数据脱敏注解 com.gitee.apanlh.annotation.load - 初始化加载注解 com.gitee.apanlh.annotation.tree - 树结构注解
com.gitee.apanlh.annotation.copy
提供拷贝字段映射注解
com.gitee.apanlh.annotation.crypto
提供自定义加解密注解
未来支持:提供自定义加解密方式/方法/字段注解
com.gitee.apanlh.annotation.desensitize
提供脱敏字段注解
com.gitee.apanlh.annotation.load
提供初始化加载类注解
com.gitee.apanlh.annotation.redis
提供初始化加载/注册Redis类注解
com.gitee.apanlh.annotation.tree
提供提供自定义树结构注解
com.gitee.apanlh.annotation.valid
提供验证静态常量字段注解
com.gitee.apanlh.annotation.viewresolver
提供请求参数解析器注解
com.gitee.apanlh.annotation.xstream
提供XML相关注解
com.gitee.apanlh.exp
提供公共异常
com.gitee.apanlh.exp.algorithm
提供公共算法相关异常
com.gitee.apanlh.exp.date
提供公共日期时间相关异常
com.gitee.apanlh.exp.desensitize  
com.gitee.apanlh.exp.file  
com.gitee.apanlh.exp.ftp  
com.gitee.apanlh.exp.http  
com.gitee.apanlh.exp.json  
com.gitee.apanlh.exp.redis  
com.gitee.apanlh.exp.reflection  
com.gitee.apanlh.exp.zip
提供公共解压缩相关异常包
com.gitee.apanlh.spring
提供对Spring相关操作封装
如获取SpringBean、请求参数解析器、Redis配置等 com.gitee.apanlh.spring.data.redis - Redis框架初始化与序列化自动配置 com.gitee.apanlh.spring.web - Web层相关组件,包括请求解析、响应封装等
com.gitee.apanlh.spring.data.redis
Redis缓存基于Spring-Data-Redis集成增强
com.gitee.apanlh.spring.data.redis.api
Redis 各数据类型 API 的抽象封装
com.gitee.apanlh.spring.data.redis.builder
RedisKey构建器及相关配置 自定义分隔符(默认为冒号 :) 批量添加多级 Key 前缀 自动拼接 Redis 数据类型对应的 Key 构建完成后自动注册到 RedisKeyLoader
com.gitee.apanlh.spring.data.redis.configure
提供默认实现Spring中Redis配置RedisJson序列化配置类
com.gitee.apanlh.spring.data.redis.core
Redis核心组件
com.gitee.apanlh.spring.data.redis.serializer
提供Redis各个类序列化器实现
com.gitee.apanlh.spring.web
Web模块自动配置类
com.gitee.apanlh.spring.web.configure
SpringWeb模块自动配置包
com.gitee.apanlh.spring.web.handler
web请求或响应处理相关的处理器
com.gitee.apanlh.spring.web.resolver
用于Spring-Web中请求参数解析器相关
com.gitee.apanlh.spring.web.resolver.content
用于根据请求内容解析器相关
核心内容解析策略
com.gitee.apanlh.spring.web.resolver.context
请求参数元数据上下文
com.gitee.apanlh.spring.web.resolver.extension
主解析器相关
如RequestVO封装请求对象请求解析器等
com.gitee.apanlh.spring.web.resolver.handler
对RequestVO后置处理增强
如分页、路径参数解析等
com.gitee.apanlh.util.algorithm
提供算法相关工具类,如密钥工具,签名工具,摘要工具,对称/非对称加解密(SM2,SM3,SM4,RSA,DES,AES,PBE等)
com.gitee.apanlh.util.algorithm.asymmetric
提供非对称加解密、签名验签及密钥管理功能
com.gitee.apanlh.util.algorithm.crypto
提供加解密、签名验签公共类
com.gitee.apanlh.util.algorithm.digest
用于提供摘要算法相关工具类
如MD5,SHA,HMac,SM3等方式
com.gitee.apanlh.util.algorithm.signature
用于提供摘要工具
com.gitee.apanlh.util.algorithm.symmetric
提供对称加解密相关
com.gitee.apanlh.util.base
基础工具包集合,提供常见工具类如
数组、BigDecimal,集合、Map、字符串工具类、包含choose(选择判断简化工具类)
Eq值判断
Empty对象创建
单例工具类
com.gitee.apanlh.util.cache
提供本地缓存相关
com.gitee.apanlh.util.cache.local
提供本地缓存方式,线程安全
弱引用缓存、时间缓存、FIFO缓存、LIFO缓存、LRU缓存、LRU-K缓存、LRUTwoQ缓存等
com.gitee.apanlh.util.cache.local.api
提供本地缓存抽象API方法
com.gitee.apanlh.util.calc
提供
数值计算器(链式计算)
数值收集器(用于组合计算)
com.gitee.apanlh.util.check
提供该工具类包下做一个三方依赖检测,用于验证是否某个特殊工具类外部特定导入包
com.gitee.apanlh.util.compression
提供数据压缩工具类
未来支持更多功能,需要对该类重构
com.gitee.apanlh.util.dataformat
提供数据交换格式如JSON(适配库),XML方式
com.gitee.apanlh.util.date
提供日期时间解析转换均采用JDK新时间API类实现
特别对解析操作优化处理
com.gitee.apanlh.util.desensitize
提供数据脱敏
默认实现脱敏方式,自定义脱敏规则(如字段等)
未来拓展:自动实现对AOP代理,无需方法内调用
com.gitee.apanlh.util.desensitize.rule
提供默认实现数据脱敏规则API接口
com.gitee.apanlh.util.encode
提供编码方式,如BASE64,十六进制,二进制,字符集编码,ASCII码,字符转义等工具类
com.gitee.apanlh.util.file
提供File文件操作方式如常见文件操作
未来实现文件归档
com.gitee.apanlh.util.func
提供公共函数式接口
com.gitee.apanlh.util.id
ID生成器,如自定义分布式id,雪花id,UUID等
com.gitee.apanlh.util.image
提供对图形操作的工具类
未来需要重构
com.gitee.apanlh.util.io
提供IO流操作,FileIO操作(均采用FileChannel方式实现)
com.gitee.apanlh.util.log
提供日志处理类
com.gitee.apanlh.util.measure
提供计时器操作
支持时间嵌套
com.gitee.apanlh.util.net
提供网络通讯相关工具包
com.gitee.apanlh.util.net.addr
提供IP工具类
com.gitee.apanlh.util.net.ftp
FTP工具包,依赖于(Apache FTPClient)对FTP命令进行封装简化使用
com.gitee.apanlh.util.net.http
提供HTTP客户端实现采用两种客户端(原生客户端/JDK11客户端)
特别提供链路耗时,链路ID等功能
未来增加链路监控方式
支持对虚拟线程优化(但必须使用jdk21)
com.gitee.apanlh.util.net.http.auth
提供HTTP默认实现请求头,自定义请求头,默认验证对象相关
com.gitee.apanlh.util.net.http.client
提供HTTP抽象客户端相关
com.gitee.apanlh.util.net.http.format
提供HTTP客户端实现字段格式化包
com.gitee.apanlh.util.net.http.handler
提供HTTP拦截器处理
请求前(参数转换后),请求参数转换前,响应后拦截
com.gitee.apanlh.util.net.http.handler.body
内部对HTTPBody进行自动参数转化解析策略
com.gitee.apanlh.util.net.http.handler.body.cast
内部对HTTPBody进行强制转换操作
com.gitee.apanlh.util.net.http.io
提供HTTP流抽象类
com.gitee.apanlh.util.random
提供随机数支持,随机验证码工具
com.gitee.apanlh.util.reflection
提供类、Class类型、反射、拷贝对象工具包
对反射类、方法、元注解、字段操作时性能优化
com.gitee.apanlh.util.reflection.copy
提供拷贝时配置处理
com.gitee.apanlh.util.reflection.load
内部初始化加载类实现方式
com.gitee.apanlh.util.setting
提供YAML,Properties,资源/外部资源工具类
com.gitee.apanlh.util.spi  
com.gitee.apanlh.util.sys
提供对JDK,系统,JVM等方法封装
com.gitee.apanlh.util.sys.jdk
提供JDK信息
未来重构
com.gitee.apanlh.util.sys.jvm
提供JVM信息
未来重构
com.gitee.apanlh.util.thread
提供线程/锁/堆栈相关工具
com.gitee.apanlh.util.thread.lock  
com.gitee.apanlh.util.tree
提供对于对象转换数结构
如树形菜单等,借助注解可以自动转换成树结构使用
com.gitee.apanlh.util.unit
提供对单位相关工具
如:时间,数据长度,byte长度可读转换器
com.gitee.apanlh.util.valid
提供断言,身份证,正则,所有对象基础验证类(空值等其他操作)
建议对象判空采用ValidParam使用
com.gitee.apanlh.web
对ServletWeb相关公共操作
提供:过滤器,解析器,配置,公共请求对象,公共响应对象
对Servlet工具
com.gitee.apanlh.web.config
提供对于SpringFilter默认实现配置类
com.gitee.apanlh.web.content
提供对于Web请求参数解析默认策略
com.gitee.apanlh.web.filter
提供公共默认实现过滤器
com.gitee.apanlh.web.filter.xss
提供公共默认XSS过滤验证
com.gitee.apanlh.web.http
提供公共常见HTTPContentType及Http请求方法枚举
com.gitee.apanlh.web.model
提供公共数据对象,如分页,请求对象等
com.gitee.apanlh.web.model.vo
提供Web公共请求数据对象
com.gitee.apanlh.web.msg
提供返回响应消息状态类
包含公共类/自定义接口类
com.gitee.apanlh.web.util
提供对Servlet,文件上传相关
com.gitee.apanlh.web.wrapper
提供默认实现Wrapper转换器