feat:调整展示路径

This commit is contained in:
2026-05-18 23:42:38 +08:00
parent f553409544
commit 852cb7e7a6
5 changed files with 19 additions and 28 deletions

View File

@@ -1,19 +1,18 @@
package com.bruce.common.config; package com.bruce.common.config;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component @Component
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ConfigurationProperties(prefix = "common.attachment") @ConfigurationProperties(prefix = "common.attachment")
public class AttachmentProperties { public class AttachmentProperties {
private String basePath = "data/attachments"; private final String BASE_PATH = "data/attachments";
public String getBasePath() {
return basePath;
}
public void setBasePath(String basePath) {
this.basePath = basePath;
}
} }

View File

@@ -4,6 +4,7 @@ import com.bruce.common.entity.SysAttachment;
import com.bruce.common.service.ISysAttachmentService; import com.bruce.common.service.ISysAttachmentService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
@@ -15,11 +16,8 @@ import org.springframework.web.multipart.MultipartFile;
@RequestMapping("/api/attachments") @RequestMapping("/api/attachments")
public class SysAttachmentController { public class SysAttachmentController {
private final ISysAttachmentService sysAttachmentService; @Autowired
private ISysAttachmentService sysAttachmentService;
public SysAttachmentController(ISysAttachmentService sysAttachmentService) {
this.sysAttachmentService = sysAttachmentService;
}
@Operation(summary = "上传附件") @Operation(summary = "上传附件")
@PostMapping("/upload") @PostMapping("/upload")

View File

@@ -4,6 +4,7 @@ import com.bruce.common.entity.SysEnum;
import com.bruce.common.service.ISysEnumService; import com.bruce.common.service.ISysEnumService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
@@ -20,11 +21,8 @@ import java.util.List;
@RequestMapping("/api/sys-enums") @RequestMapping("/api/sys-enums")
public class SysEnumController { public class SysEnumController {
private final ISysEnumService sysEnumService; @Autowired
private ISysEnumService sysEnumService;
public SysEnumController(ISysEnumService sysEnumService) {
this.sysEnumService = sysEnumService;
}
@Operation(summary = "查询全部系统枚举") @Operation(summary = "查询全部系统枚举")
@GetMapping @GetMapping

View File

@@ -4,6 +4,7 @@ import com.bruce.rag.entity.RagDocument;
import com.bruce.rag.service.IRagDocumentService; import com.bruce.rag.service.IRagDocumentService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@@ -15,11 +16,8 @@ import java.util.List;
@RequestMapping("/api/rag/documents") @RequestMapping("/api/rag/documents")
public class RagDocumentController { public class RagDocumentController {
private final IRagDocumentService ragDocumentService; @Autowired
private IRagDocumentService ragDocumentService;
public RagDocumentController(IRagDocumentService ragDocumentService) {
this.ragDocumentService = ragDocumentService;
}
@Operation(summary = "查询全部知识库文档") @Operation(summary = "查询全部知识库文档")
@GetMapping @GetMapping

View File

@@ -4,6 +4,7 @@ import com.bruce.rag.entity.RagStore;
import com.bruce.rag.service.IRagStoreService; import com.bruce.rag.service.IRagStoreService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@@ -15,11 +16,8 @@ import java.util.List;
@RequestMapping("/api/rag/stores") @RequestMapping("/api/rag/stores")
public class RagStoreController { public class RagStoreController {
private final IRagStoreService ragStoreService; @Autowired
private IRagStoreService ragStoreService;
public RagStoreController(IRagStoreService ragStoreService) {
this.ragStoreService = ragStoreService;
}
@Operation(summary = "查询全部知识库") @Operation(summary = "查询全部知识库")
@GetMapping @GetMapping