feat: 集成OSS插件并优化应用配置
- 在Web启动模块中集成OSS插件依赖 - 启用@EnableCoderOss注解激活OSS功能 - 配置阿里云OSS存储服务参数 - 添加存储服务类型切换支持 - 优化应用端口配置显示 - 完善开发环境配置文件
This commit is contained in:
parent
0767c83995
commit
40f998657a
@ -31,6 +31,12 @@
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||
</dependency>
|
||||
<!-- OSS对象存储模块 -->
|
||||
<dependency>
|
||||
<groupId>org.leocoder.thin</groupId>
|
||||
<artifactId>coder-common-thin-oss</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- 定时任务 -->
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>org.leocoder.thin</groupId> -->
|
||||
|
||||
@ -6,6 +6,7 @@ import org.leocoder.thin.easyexcel.anno.EnableCoderEasyExcel;
|
||||
import org.leocoder.thin.limit.anno.EnableCoderLimit;
|
||||
import org.leocoder.thin.mybatisplus.anno.EnableMybatisPlus;
|
||||
import org.leocoder.thin.operlog.annotation.EnableOperLog;
|
||||
import org.leocoder.thin.oss.annotation.EnableCoderOss;
|
||||
import org.leocoder.thin.repect.anno.EnableCoderRepeatSubmit;
|
||||
import org.leocoder.thin.resultex.anno.EnableResultEx;
|
||||
import org.leocoder.thin.satoken.anno.EnableCoderSaToken;
|
||||
@ -27,6 +28,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
@EnableMybatisPlus
|
||||
@EnableResultEx
|
||||
@EnableOperLog
|
||||
@EnableCoderOss
|
||||
// @EnableCoderDict
|
||||
@EnableScheduling
|
||||
@Slf4j
|
||||
@ -45,7 +47,7 @@ public class CoderApplication {
|
||||
"| | ( <_> ) | /_____/ / | \\| ` \\/ Y \\ / | \\ \n" +
|
||||
"|____|__ \\____/|__| \\____|__ /_______ /\\____|__ /___\\____|__ / \n" +
|
||||
" \\/ \\/ \\/ \\/ \\/ \n" +
|
||||
"CoderApplication[18088] => 闪亮登场(๑•̀ㅂ•́) ✧"
|
||||
"CoderApplication[18099] => 闪亮登场(๑•̀ㅂ•́) ✧"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,6 +90,32 @@ coder:
|
||||
projectVersion: 1.0.0
|
||||
# 文件路径 示例[Windows配置D:/CoderFile,Linux配置 /usr/local/CoderFile]
|
||||
filePath: /Users/leocoder/leocoder/develop/templates/coder-common-thin/coder-common-thin-backend/picture
|
||||
# 存储服务配置
|
||||
storage:
|
||||
# 存储类型:local(本地存储) | minio(MinIO对象存储) | oss(阿里云OSS)
|
||||
type: oss
|
||||
# 阿里云OSS配置
|
||||
oss:
|
||||
# 是否启用OSS存储
|
||||
enabled: true
|
||||
# OSS服务端点
|
||||
endpoint: oss-cn-hangzhou.aliyuncs.com
|
||||
# 访问密钥ID
|
||||
access-key-id: ${OSS_ACCESS_KEY_ID:LTAI5t982gXi7A72gAa9yugE}
|
||||
# 访问密钥Secret
|
||||
access-key-secret: ${OSS_ACCESS_KEY_SECRET:Mi9ZsSWLGkvFoMiLNiZ71hHFzVso30}
|
||||
# 存储桶名称
|
||||
bucket-name: gaoziman
|
||||
# 自定义域名(可选)
|
||||
domain: https://gaoziman.oss-cn-hangzhou.aliyuncs.com
|
||||
# 路径前缀
|
||||
path-prefix: coder-files
|
||||
# 是否使用HTTPS
|
||||
https: true
|
||||
# 连接超时时间(毫秒)
|
||||
connect-timeout: 10000
|
||||
# 读取超时时间(毫秒)
|
||||
read-timeout: 10000
|
||||
# 全局限流
|
||||
globalLimit:
|
||||
# 是否开启全局限流
|
||||
|
||||
Loading…
Reference in New Issue
Block a user