mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-03-15 21:53:46 +08:00
24 lines
629 B
Java
24 lines
629 B
Java
package cn.keking.utils;
|
|
|
|
import cn.keking.config.ConfigConstants;
|
|
import cn.keking.model.ReturnResponse;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
/**
|
|
* 读取类文本文件
|
|
* @author yudian-it
|
|
* @date 2017/12/13
|
|
*/
|
|
@Component
|
|
public class SimTextUtil {
|
|
String fileDir = ConfigConstants.getFileDir();
|
|
@Autowired
|
|
DownloadUtils downloadUtils;
|
|
|
|
public ReturnResponse<String> readSimText(String url, String fileName){
|
|
ReturnResponse<String> response = downloadUtils.downLoad(url, "txt", fileName);
|
|
return response;
|
|
}
|
|
}
|