From 16f9a325d765410e8f16be31d86f872cbdea665d Mon Sep 17 00:00:00 2001 From: bruce Date: Wed, 20 May 2026 00:09:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=B1=9E=E6=80=A7=E6=9E=84=E9=80=A0=E5=99=A8?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bruce/common/config/AttachmentProperties.java | 8 +++----- .../service/impl/SysAttachmentServiceImpl.java | 8 +++----- .../SysAttachmentComponentStructureTests.java | 12 ++++++++++++ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/bruce/common/config/AttachmentProperties.java b/src/main/java/com/bruce/common/config/AttachmentProperties.java index 1d4e688..cb2caf1 100644 --- a/src/main/java/com/bruce/common/config/AttachmentProperties.java +++ b/src/main/java/com/bruce/common/config/AttachmentProperties.java @@ -1,18 +1,16 @@ package com.bruce.common.config; -import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; @Component -@Getter -@AllArgsConstructor +@Data @NoArgsConstructor @ConfigurationProperties(prefix = "common.attachment") public class AttachmentProperties { - private final String BASE_PATH = "data/attachments"; + private String basePath = "data/attachments"; } diff --git a/src/main/java/com/bruce/common/service/impl/SysAttachmentServiceImpl.java b/src/main/java/com/bruce/common/service/impl/SysAttachmentServiceImpl.java index b9fe4b6..605a17b 100644 --- a/src/main/java/com/bruce/common/service/impl/SysAttachmentServiceImpl.java +++ b/src/main/java/com/bruce/common/service/impl/SysAttachmentServiceImpl.java @@ -6,6 +6,7 @@ import com.bruce.common.domain.entity.SysAttachment; import com.bruce.common.dto.request.SysAttachmentUploadRequest; import com.bruce.common.mapper.SysAttachmentMapper; import com.bruce.common.service.ISysAttachmentService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; import org.springframework.web.multipart.MultipartFile; @@ -23,11 +24,8 @@ public class SysAttachmentServiceImpl extends ServiceImpl