提交 b3b18c38 编写于 作者: wuhui's avatar wuhui

文件上传添加阿里os模式

上级 293c6970
package cn.ibizlab.core.disk.extensions.service;
import cn.ibizlab.core.disk.extensions.vo.FileItem;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
@Primary
@Slf4j
@Service
@ConditionalOnExpression("${ibiz.aliOsdisk:false}")
public class AliOsDiskService extends DiskCoreService{
@Override
public FileItem saveFile(String folder, String fileId, String ownerType, String ownerId, MultipartFile multipartFile) {
return super.saveFile(folder,fileId,ownerType,ownerId,multipartFile);
}
}
...@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; ...@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
...@@ -34,6 +35,7 @@ import java.util.List; ...@@ -34,6 +35,7 @@ import java.util.List;
@Primary @Primary
@Slf4j @Slf4j
@Service @Service
@ConditionalOnExpression("!${ibiz.aliOsdisk:false}")
public class DiskCoreService { public class DiskCoreService {
@Value("${ibiz.filePath:/app/file/}") @Value("${ibiz.filePath:/app/file/}")
...@@ -247,4 +249,4 @@ public class DiskCoreService { ...@@ -247,4 +249,4 @@ public class DiskCoreService {
return value; return value;
} }
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册