Class AttachmentService
java.lang.Object
io.github.xezzon.zeroweb.attachment.internal.AttachmentService
- All Implemented Interfaces:
IAttachmentService
附件管理服务
- Author:
- xezzon
-
Constructor Summary
ConstructorsConstructorDescriptionAttachmentService(AttachmentRepository attachmentRepository, ZerowebFileConfig zerowebFileConfig, IStorageService.Factory storageServiceFactory) 依赖注入 -
Method Summary
-
Constructor Details
-
AttachmentService
public AttachmentService(AttachmentRepository attachmentRepository, ZerowebFileConfig zerowebFileConfig, IStorageService.Factory storageServiceFactory) 依赖注入- Parameters:
attachmentRepository- 附件 JPA 接口zerowebFileConfig- 文件管理相关设置storageServiceFactory- 用于获取存储操作服务实现类的工厂
-
-
Method Details
-
queryById
根据附件ID查询附件信息- Specified by:
queryByIdin interfaceIAttachmentService- Parameters:
id- 附件唯一标识- Returns:
- 附件实体对象
- Throws:
NoSuchElementException- 当附件不存在时抛出
-