feat(file): 配置Minio文件存储支持
- 新增Minio存储类型配置选项- 配置Minio服务地址、访问密钥和存储桶名称 - 更新默认模块名称以使用Minio存储 - 保留原有基础路径和URL前缀配置- 支持MinioClient Bean的自动配置 - 确保存储桶具有读写权限并提前创建
This commit is contained in:
@@ -15,10 +15,22 @@ SiWu:
|
|||||||
gc:
|
gc:
|
||||||
starter:
|
starter:
|
||||||
file:
|
file:
|
||||||
# 一个存储文件的绝对路径,需要有写入权限,这里可以直接引用SiWu的配置
|
# 存储类型:指定为minio(启用MinioClient Bean)
|
||||||
|
type: minio
|
||||||
|
# 基础存储路径(保留原有配置,不冲突)
|
||||||
basePath: ${SiWu.profile}
|
basePath: ${SiWu.profile}
|
||||||
# 静态资源访问接口前缀
|
# 静态资源访问前缀(保留原有配置)
|
||||||
urlPrefix: http://127.0.0.1:${server.port}${server.servlet.context-path}static/
|
urlPrefix: http://127.0.0.1:${server.port}${server.servlet.context-path}static/
|
||||||
|
# Minio核心配置(根据你的Minio服务实际信息修改)
|
||||||
|
minio:
|
||||||
|
# Minio服务地址(格式:http://ip:端口,例如本地默认9000端口)
|
||||||
|
url: http://49.232.154.205:10900
|
||||||
|
# Minio访问密钥(对应Minio的accessKey)
|
||||||
|
accessKey: 4EsLD9g9OM09DT0HaBKj
|
||||||
|
# Minio密钥(对应Minio的secretKey)
|
||||||
|
secretKey: 05SFC5fleqTnaLRYBrxHiphMFYbGX5nYicj0WCHA
|
||||||
|
# 存储桶名称(必须提前在Minio中创建,且有读写权限)
|
||||||
|
bucketName: dashboard
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class DataRoomFileController extends SuperController {
|
|||||||
DataRoomFileEntity entity = new DataRoomFileEntity();
|
DataRoomFileEntity entity = new DataRoomFileEntity();
|
||||||
// 不同业务自己控制
|
// 不同业务自己控制
|
||||||
if (StringUtils.isBlank(module)) {
|
if (StringUtils.isBlank(module)) {
|
||||||
module = "other";
|
module = "minio";
|
||||||
}
|
}
|
||||||
entity.setModule(module);
|
entity.setModule(module);
|
||||||
sysOssService.upload(file, entity, response, request);
|
sysOssService.upload(file, entity, response, request);
|
||||||
|
|||||||
Reference in New Issue
Block a user