file.Dir变为选配置添加其默认值

This commit is contained in:
陈精华
2019-04-16 21:09:32 +08:00
committed by kl
parent b625381de3
commit 4a7ba07df1
10 changed files with 68 additions and 24 deletions

View File

@ -1,7 +1,7 @@
package cn.keking.utils;
import cn.keking.config.ConfigConstants;
import cn.keking.model.ReturnResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.io.*;
import java.net.*;
@ -13,8 +13,7 @@ import java.util.UUID;
@Component
public class DownloadUtils {
@Value("${file.dir}")
String fileDir;
String fileDir = ConfigConstants.getFileDir();
/**
* 一开始测试的时候发现有些文件没有下载下来,而有些可以;当时也是郁闷了好一阵,但是最终还是不得解