mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 10:18:42 +08:00 
			
		
		
		
	同步 Master 最新代码
This commit is contained in:
		| @@ -119,6 +119,8 @@ public class YudaoTenantAutoConfiguration { | |||||||
|         }; |         }; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     // ========== Redis ========== | ||||||
|  |  | ||||||
|     @Bean |     @Bean | ||||||
|     @Primary // 引入租户时,tenantRedisCacheManager 为主 Bean |     @Primary // 引入租户时,tenantRedisCacheManager 为主 Bean | ||||||
|     public RedisCacheManager tenantRedisCacheManager(RedisTemplate<String, Object> redisTemplate, |     public RedisCacheManager tenantRedisCacheManager(RedisTemplate<String, Object> redisTemplate, | ||||||
|   | |||||||
| @@ -2,7 +2,6 @@ package cn.iocoder.yudao.framework.tenant.core.redis; | |||||||
|  |  | ||||||
| import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; | import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; | ||||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||||
| import org.jetbrains.annotations.NotNull; |  | ||||||
| import org.springframework.cache.Cache; | import org.springframework.cache.Cache; | ||||||
| import org.springframework.data.redis.cache.RedisCacheConfiguration; | import org.springframework.data.redis.cache.RedisCacheConfiguration; | ||||||
| import org.springframework.data.redis.cache.RedisCacheManager; | import org.springframework.data.redis.cache.RedisCacheManager; | ||||||
| @@ -24,7 +23,7 @@ public class TenantRedisCacheManager extends RedisCacheManager { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public Cache getCache(@NotNull String name) { |     public Cache getCache(String name) { | ||||||
|         // 如果开启多租户,则 name 拼接租户后缀 |         // 如果开启多租户,则 name 拼接租户后缀 | ||||||
|         if (!TenantContextHolder.isIgnore() |         if (!TenantContextHolder.isIgnore() | ||||||
|             && TenantContextHolder.getTenantId() != null) { |             && TenantContextHolder.getTenantId() != null) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV