删除多余的依赖

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

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

@ -52,16 +52,15 @@
<dependency> <dependency>
<groupId>com.github.tobato</groupId> <groupId>com.github.tobato</groupId>
<artifactId>fastdfs-client</artifactId> <artifactId>fastdfs-client</artifactId>
<version>1.26.5</version>
</dependency> </dependency>
<!-- Ruoyi Common Security --> <!-- RuoYi Api System -->
<dependency> <dependency>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-security</artifactId> <artifactId>ruoyi-api-system</artifactId>
</dependency> </dependency>
<!-- Ruoyi Common Swagger --> <!-- RuoYi Common Swagger -->
<dependency> <dependency>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-swagger</artifactId> <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.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2; import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
/** /**
@ -13,7 +12,6 @@ import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
* @author ruoyi * @author ruoyi
*/ */
@EnableCustomSwagger2 @EnableCustomSwagger2
@EnableRyFeignClients
@EnableDiscoveryClient @EnableDiscoveryClient
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class }) @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
public class RuoYFileApplication public class RuoYFileApplication

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

@ -29,12 +29,11 @@ public class FastDfsSysFileServiceImpl implements ISysFileService
* FastDfs * FastDfs
* *
* @param file * @param file
* @param baseDir
* @return 访 * @return 访
* @throws Exception * @throws Exception
*/ */
@Override @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(), StorePath storePath = storageClient.uploadFile(file.getInputStream(), file.getSize(),
FilenameUtils.getExtension(file.getOriginalFilename()), null); FilenameUtils.getExtension(file.getOriginalFilename()), null);

@ -13,9 +13,8 @@ public interface ISysFileService
* *
* *
* @param file * @param file
* @param baseDir
* @return 访 * @return 访
* @throws Exception * @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}") @Value("${file.domain}")
public String domain; public String domain;
/**
*
*/
@Value("${file.path}")
private String localFilePath;
/** /**
* *
@ -35,9 +41,9 @@ public class LocalSysFileServiceImpl implements ISysFileService
* @return 访 * @return 访
* @throws Exception * @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; String url = domain + localFilePrefix + name;
return url; return url;
} }

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

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

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

Loading…
Cancel
Save