This commit is contained in:
zc
2026-03-16 09:38:58 +08:00
parent bf1af52660
commit 8d588502aa
2 changed files with 13 additions and 17 deletions

View File

@@ -20,7 +20,7 @@ import org.springframework.stereotype.Component;
@Component
public class NettyTcpServer {
@Value("${tcp.server.port:9005}")
@Value("${tcp.server.port:27526}")
private int port;
@Value("${tcp.server.boss-threads:1}")

View File

@@ -6,9 +6,6 @@ import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.dromara.x.file.storage.core.FileInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -38,7 +35,7 @@ public class VmCommandController {
private SimpleRequestMatcher requestMatcher;
@Autowired
private FileService fileService;
private FileService fileService;
@GetMapping("/send")
public String sendAndWait(@RequestParam String msg) {
@@ -136,11 +133,10 @@ public class VmCommandController {
// 将文件转换为MultipartFile
File file = imagePath.toFile();
FileInputStream input = new FileInputStream(file);
MultipartFile multipartFile = new MockMultipartFile(
file.getName(), // 文件名
file.getName(), // 原始文件名
"image/bmp", // 内容类型
input // 文件输入流
MultipartFile multipartFile = new MockMultipartFile(file.getName(), // 文件名
file.getName(), // 原始文件名
"image/bmp", // 内容类型
input // 文件输入流
);
// 构建MinIO存储路径