添加多运行环境支持 #14
@@ -9,13 +9,16 @@ import javax.annotation.Resource;
|
||||
/**
|
||||
* @author : xiaohai
|
||||
* @date : 2020/10/15 18:52
|
||||
* @desc :
|
||||
* @desc : 提供文件管理器的服务
|
||||
*/
|
||||
@Service("fileServiceImpl")
|
||||
public class FileServiceImpl implements FileService {
|
||||
@Resource(name = "qiniuFileServiceImpl")
|
||||
FileManager qiniuFileManager;
|
||||
|
||||
@Resource(name = "localFileServiceImpl")
|
||||
FileManager localFileServiceImpl;
|
||||
|
||||
@Override
|
||||
public FileManager getFileManager() {
|
||||
return qiniuFileManager;
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package cn.celess.blog.service.fileserviceimpl;
|
||||
|
||||
import cn.celess.blog.entity.model.FileInfo;
|
||||
import cn.celess.blog.entity.model.FileResponse;
|
||||
import cn.celess.blog.service.FileManager;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
* @date : 2020/10/16 14:39
|
||||
* @desc :
|
||||
*/
|
||||
@Service("localFileServiceImpl")
|
||||
public class LocalFileServiceImpl implements FileManager {
|
||||
@Override
|
||||
public FileResponse uploadFile(InputStream is, String fileName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FileInfo> getFileList() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteFile(String fileName) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
blog.easyDeploy.file.qiniu.accessKey=
|
||||
blog.easyDeploy.file.qiniu.secretKey=
|
||||
blog.easyDeploy.file.qiniu.bucket=
|
||||
|
||||
blog.easyDeploy.file.local.dictoryPath=
|
||||
Reference in New Issue
Block a user