refactor(resource): 重构资源存储和管理逻辑

- 移除了 AbstractResourceStore 类
- 新增了 CrudResourceStore 接口,定义了 CRUD操作
- 修改了 DefaultImageCaptchaResourceManager,支持批量获取资源和模板
- 重构了 FontCache 类,改为实现 ResourceStore 接口
- 更新了相关应用类,使用新的资源管理逻辑
This commit is contained in:
天爱有情
2025-06-30 16:34:24 +08:00
parent 12d290919a
commit cb92a224d5
25 changed files with 386 additions and 586 deletions
@@ -31,6 +31,27 @@ public interface ImageCaptchaResourceManager {
*/
Resource randomGetResource(String type, String tag);
/**
* 随机获取某个模板
*
* @param type 验证码类型
* @param tag 二级过滤,可以为空
* @param quantity 一次性获取的数量
* @return Map<String, Resource>
*/
List<ResourceMap> randomGetTemplate(String type, String tag, Integer quantity);
/**
* 随机获取某个资源对象
*
* @param type 验证码类型
* @param tag 二级过滤,可以为空
* @param quantity 一次性获取的数量
* @return Resource
*/
List<Resource> randomGetResource(String type, String tag, Integer quantity);
/**
* 获取真正的资源流通过资源对象
*