mirror of
https://github.com/dromara/tianai-captcha.git
synced 2026-05-09 23:23:05 +08:00
refactor(resource): 重构资源存储和管理逻辑
- 移除了 AbstractResourceStore 类 - 新增了 CrudResourceStore 接口,定义了 CRUD操作 - 修改了 DefaultImageCaptchaResourceManager,支持批量获取资源和模板 - 重构了 FontCache 类,改为实现 ResourceStore 接口 - 更新了相关应用类,使用新的资源管理逻辑
This commit is contained in:
@@ -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);
|
||||
|
||||
/**
|
||||
* 获取真正的资源流通过资源对象
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user