1
This commit is contained in:
@@ -36,11 +36,6 @@ public class VersionController extends BaseController {
|
||||
try {
|
||||
// 从Redis获取最新版本信息
|
||||
String latestVersion = redisTemplate.opsForValue().get(VERSION_REDIS_KEY);
|
||||
|
||||
if (StringUtils.isEmpty(latestVersion)) {
|
||||
latestVersion = "2.0.0"; // 默认版本
|
||||
}
|
||||
|
||||
// 比较版本号
|
||||
boolean needUpdate = compareVersions(currentVersion, latestVersion) < 0;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
@@ -40,7 +41,11 @@ public class FileController {
|
||||
private final Auth auth;
|
||||
|
||||
@PostMapping("/uploads")
|
||||
public AjaxResult uploadFiles(List<MultipartFile> files) {
|
||||
public AjaxResult uploadFiles(@RequestParam("files") List<MultipartFile> files) {
|
||||
if (files == null || files.isEmpty()) {
|
||||
return AjaxResult.error("没有选择文件");
|
||||
}
|
||||
|
||||
List<FileDto> fileDtoS = new ArrayList<>();
|
||||
for (MultipartFile file : files) {
|
||||
String extName = FileUtil.extName(file.getOriginalFilename());
|
||||
@@ -59,7 +64,7 @@ public class FileController {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return AjaxResult.success(fileDtoS) ;
|
||||
return AjaxResult.success(fileDtoS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,6 +137,6 @@ xss:
|
||||
# 过滤开关
|
||||
enabled: true
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice,/tool/webmagic
|
||||
excludes: /system/notice,/tool/webmagic,/file/*
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
Reference in New Issue
Block a user