mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	fix 修复 OssClient 实例多租户相同key缓存覆盖问题
This commit is contained in:
		@@ -51,13 +51,13 @@ public class OssFactory {
 | 
			
		||||
        if (client == null) {
 | 
			
		||||
            CLIENT_CACHE.put(key, new OssClient(configKey, properties));
 | 
			
		||||
            log.info("创建OSS实例 key => {}", configKey);
 | 
			
		||||
            return CLIENT_CACHE.get(configKey);
 | 
			
		||||
            return CLIENT_CACHE.get(key);
 | 
			
		||||
        }
 | 
			
		||||
        // 配置不相同则重新构建
 | 
			
		||||
        if (!client.checkPropertiesSame(properties)) {
 | 
			
		||||
            CLIENT_CACHE.put(key, new OssClient(configKey, properties));
 | 
			
		||||
            log.info("重载OSS实例 key => {}", configKey);
 | 
			
		||||
            return CLIENT_CACHE.get(configKey);
 | 
			
		||||
            return CLIENT_CACHE.get(key);
 | 
			
		||||
        }
 | 
			
		||||
        return client;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user