[重大更改] 移除多租户相关功能

This commit is contained in:
疯狂的狮子Li
2026-01-13 16:14:52 +08:00
parent 55098339d4
commit 145b903185
118 changed files with 676 additions and 4576 deletions

View File

@@ -48,20 +48,16 @@ public class OssFactory {
}
OssProperties properties = JsonUtils.parseObject(json, OssProperties.class);
// 使用租户标识避免多个租户相同key实例覆盖
String key = configKey;
if (StringUtils.isNotBlank(properties.getTenantId())) {
key = properties.getTenantId() + ":" + configKey;
}
OssClient client = CLIENT_CACHE.get(key);
OssClient client = CLIENT_CACHE.get(configKey);
// 客户端不存在或配置不相同则重新构建
if (client == null || !client.checkPropertiesSame(properties)) {
LOCK.lock();
try {
client = CLIENT_CACHE.get(key);
client = CLIENT_CACHE.get(configKey);
if (client == null || !client.checkPropertiesSame(properties)) {
CLIENT_CACHE.put(key, new OssClient(configKey, properties));
CLIENT_CACHE.put(configKey, new OssClient(configKey, properties));
log.info("创建OSS实例 key => {}", configKey);
return CLIENT_CACHE.get(key);
return CLIENT_CACHE.get(configKey);
}
} finally {
LOCK.unlock();

View File

@@ -10,11 +10,6 @@ import lombok.Data;
@Data
public class OssProperties {
/**
* 租户id
*/
private String tenantId;
/**
* 访问站点
*/