From 5f3cbece7b1e78228b0e6bdc75d26e4b9adedafc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BE=E5=87=A0=E6=B5=B7?= Date: Fri, 16 Oct 2020 15:16:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=AC=E5=9C=B0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fileserviceimpl/FileServiceImpl.java | 5 ++- .../fileserviceimpl/LocalFileServiceImpl.java | 32 +++++++++++++++++++ .../application-easyDeploy.properties | 5 +++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 src/main/java/cn/celess/blog/service/fileserviceimpl/LocalFileServiceImpl.java diff --git a/src/main/java/cn/celess/blog/service/fileserviceimpl/FileServiceImpl.java b/src/main/java/cn/celess/blog/service/fileserviceimpl/FileServiceImpl.java index 143569e..7f49b07 100644 --- a/src/main/java/cn/celess/blog/service/fileserviceimpl/FileServiceImpl.java +++ b/src/main/java/cn/celess/blog/service/fileserviceimpl/FileServiceImpl.java @@ -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; diff --git a/src/main/java/cn/celess/blog/service/fileserviceimpl/LocalFileServiceImpl.java b/src/main/java/cn/celess/blog/service/fileserviceimpl/LocalFileServiceImpl.java new file mode 100644 index 0000000..8e2b23a --- /dev/null +++ b/src/main/java/cn/celess/blog/service/fileserviceimpl/LocalFileServiceImpl.java @@ -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 getFileList() { + return null; + } + + @Override + public boolean deleteFile(String fileName) { + return false; + } +} diff --git a/src/main/resources/application-easyDeploy.properties b/src/main/resources/application-easyDeploy.properties index e69de29..498295d 100644 --- a/src/main/resources/application-easyDeploy.properties +++ b/src/main/resources/application-easyDeploy.properties @@ -0,0 +1,5 @@ +blog.easyDeploy.file.qiniu.accessKey= +blog.easyDeploy.file.qiniu.secretKey= +blog.easyDeploy.file.qiniu.bucket= + +blog.easyDeploy.file.local.dictoryPath= \ No newline at end of file