删除多余的依赖

This commit is contained in:
RuoYi
2020-11-25 18:22:57 +08:00
parent 1abf802a09
commit 6b36b32e39
10 changed files with 29 additions and 51 deletions

View File

@@ -3,7 +3,6 @@ package com.ruoyi.file.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
@@ -22,12 +21,6 @@ public class SysFileController
{
private static final Logger log = LoggerFactory.getLogger(SysFileController.class);
/**
* 上传文件存储在本地的根路径
*/
@Value("${file.path}")
private String localFilePath;
@Autowired
private ISysFileService sysFileService;
@@ -40,7 +33,7 @@ public class SysFileController
try
{
// 上传并返回访问地址
String url = sysFileService.uploadFile(file, localFilePath);
String url = sysFileService.uploadFile(file);
SysFile sysFile = new SysFile();
sysFile.setName(FileUtils.getName(url));
sysFile.setUrl(url);