feat: 本地文件服务
This commit is contained in:
@@ -9,13 +9,16 @@ import javax.annotation.Resource;
|
|||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
* @date : 2020/10/15 18:52
|
* @date : 2020/10/15 18:52
|
||||||
* @desc :
|
* @desc : 提供文件管理器的服务
|
||||||
*/
|
*/
|
||||||
@Service("fileServiceImpl")
|
@Service("fileServiceImpl")
|
||||||
public class FileServiceImpl implements FileService {
|
public class FileServiceImpl implements FileService {
|
||||||
@Resource(name = "qiniuFileServiceImpl")
|
@Resource(name = "qiniuFileServiceImpl")
|
||||||
FileManager qiniuFileManager;
|
FileManager qiniuFileManager;
|
||||||
|
|
||||||
|
@Resource(name = "localFileServiceImpl")
|
||||||
|
FileManager localFileServiceImpl;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FileManager getFileManager() {
|
public FileManager getFileManager() {
|
||||||
return qiniuFileManager;
|
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