删除多余的依赖

pull/29/head
RuoYi 4 years ago
parent 1abf802a09
commit 6b36b32e39

@ -24,6 +24,7 @@
<spring-boot.mybatis>2.1.3</spring-boot.mybatis>
<swagger.fox.version>2.9.2</swagger.fox.version>
<swagger.core.version>1.5.24</swagger.core.version>
<tobato.version>1.26.5</tobato.version>
<kaptcha.version>2.3.2</kaptcha.version>
<pagehelper.boot.version>1.3.0</pagehelper.boot.version>
<commons.io.version>2.5</commons.io.version>
@ -72,6 +73,13 @@
<version>${spring-boot-admin.version}</version>
</dependency>
<!-- FastDFS 分布式文件系统 -->
<dependency>
<groupId>com.github.tobato</groupId>
<artifactId>fastdfs-client</artifactId>
<version>${tobato.version}</version>
</dependency>
<!-- Mybatis 依赖配置 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>

@ -52,16 +52,15 @@
<dependency>
<groupId>com.github.tobato</groupId>
<artifactId>fastdfs-client</artifactId>
<version>1.26.5</version>
</dependency>
<!-- Ruoyi Common Security -->
<!-- RuoYi Api System -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-security</artifactId>
<artifactId>ruoyi-api-system</artifactId>
</dependency>
<!-- Ruoyi Common Swagger -->
<!-- RuoYi Common Swagger -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-swagger</artifactId>

@ -4,7 +4,6 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
/**
@ -13,7 +12,6 @@ import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
* @author ruoyi
*/
@EnableCustomSwagger2
@EnableRyFeignClients
@EnableDiscoveryClient
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
public class RuoYFileApplication

@ -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);

@ -29,12 +29,11 @@ public class FastDfsSysFileServiceImpl implements ISysFileService
* FastDfs
*
* @param file
* @param baseDir
* @return 访
* @throws Exception
*/
@Override
public String uploadFile(MultipartFile file, String baseDir) throws Exception
public String uploadFile(MultipartFile file) throws Exception
{
StorePath storePath = storageClient.uploadFile(file.getInputStream(), file.getSize(),
FilenameUtils.getExtension(file.getOriginalFilename()), null);

@ -13,9 +13,8 @@ public interface ISysFileService
*
*
* @param file
* @param baseDir
* @return 访
* @throws Exception
*/
public String uploadFile(MultipartFile file, String baseDir) throws Exception;
public String uploadFile(MultipartFile file) throws Exception;
}

@ -26,6 +26,12 @@ public class LocalSysFileServiceImpl implements ISysFileService
*/
@Value("${file.domain}")
public String domain;
/**
*
*/
@Value("${file.path}")
private String localFilePath;
/**
*
@ -35,9 +41,9 @@ public class LocalSysFileServiceImpl implements ISysFileService
* @return 访
* @throws Exception
*/
public String uploadFile(MultipartFile file, String baseDir) throws Exception
public String uploadFile(MultipartFile file) throws Exception
{
String name = FileUploadUtils.upload(baseDir, file);
String name = FileUploadUtils.upload(localFilePath, file);
String url = domain + localFilePrefix + name;
return url;
}

@ -60,19 +60,13 @@
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Ruoyi Common Security-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-security</artifactId>
</dependency>
<!-- Ruoyi Common Log -->
<!-- RuoYi Common Log -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-log</artifactId>
</dependency>
<!-- Ruoyi Common Swagger -->
<!-- RuoYi Common Swagger -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-swagger</artifactId>

@ -66,19 +66,13 @@
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Ruoyi Common Security-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-security</artifactId>
</dependency>
<!-- Ruoyi Common Log -->
<!-- RuoYi Common Log -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-log</artifactId>
</dependency>
<!-- Ruoyi Common Swagger -->
<!-- RuoYi Common Swagger -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-swagger</artifactId>

@ -54,35 +54,23 @@
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Ruoyi Common Security -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-security</artifactId>
</dependency>
<!-- Ruoyi Common Datascope -->
<!-- RuoYi Common Datascope -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-datascope</artifactId>
</dependency>
<!-- Ruoyi Common Log -->
<!-- RuoYi Common Log -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-log</artifactId>
</dependency>
<!-- Ruoyi Common Swagger -->
<!-- RuoYi Common Swagger -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-swagger</artifactId>
</dependency>
<!-- RuoYi Common Redis-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-redis</artifactId>
</dependency>
</dependencies>

Loading…
Cancel
Save