✨ 接入账单 OSS 存储并区分生产测试目录

This commit is contained in:
caojia
2026-10-16 16:44:51 +08:00
parent 9824e05919
commit b0719d2ae9
9 changed files with 406 additions and 36 deletions
@@ -0,0 +1,30 @@
package com.bms.common.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/** OSS 连接配置;密钥由环境变量或外部配置提供。 */
@Component
@ConfigurationProperties(prefix = "oss")
public class OssProperties {
private String endpoint;
private String bucket;
private String accessKeyId;
private String accessKeySecret;
private boolean cname = true;
/** 仅用于新上传对象;历史文件按数据库中的完整存储标识读取。 */
private String pathPrefix = "bms/test";
public String getEndpoint() { return endpoint; }
public void setEndpoint(String endpoint) { this.endpoint = endpoint; }
public String getBucket() { return bucket; }
public void setBucket(String bucket) { this.bucket = bucket; }
public String getAccessKeyId() { return accessKeyId; }
public void setAccessKeyId(String accessKeyId) { this.accessKeyId = accessKeyId; }
public String getAccessKeySecret() { return accessKeySecret; }
public void setAccessKeySecret(String accessKeySecret) { this.accessKeySecret = accessKeySecret; }
public boolean isCname() { return cname; }
public void setCname(boolean cname) { this.cname = cname; }
public String getPathPrefix() { return pathPrefix; }
public void setPathPrefix(String pathPrefix) { this.pathPrefix = pathPrefix; }
}