| | |
| | | package com.consum.base.config; |
| | | |
| | | import org.springframework.boot.autoconfigure.AutoConfigureAfter; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import com.consum.base.FinOrgCacheProvider; |
| | | import com.consum.base.FinSysTenantCacheProvider; |
| | | import com.consum.base.FinSysTenantUserCacheProvider; |
| | |
| | | import com.consum.base.cache.RedisFinSysTenantUserCache; |
| | | import com.consum.base.cache.RedisTokenCache; |
| | | import com.consum.base.service.FinOrgService; |
| | | import com.consum.base.service.FinSysTenantServiceImpl; |
| | | import com.consum.base.service.FinSysTenantUserServiceImpl; |
| | | import com.consum.base.service.FinSysTenantService; |
| | | import com.consum.base.service.FinSysTenantUserService; |
| | | import com.iplatform.base.config.CacheConfiguration; |
| | | import com.walker.support.redis.RedisHelper; |
| | | import com.walker.support.redis.cache.RedisCacheProvider; |
| | | import org.springframework.boot.autoconfigure.AutoConfigureAfter; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | @Configuration |
| | | @ConditionalOnProperty(prefix = "iplatform.cache", name = "redis-enabled", havingValue = "true", matchIfMissing = false) |
| | |
| | | |
| | | /** |
| | | * Redis实现的业务机构缓存配置。 |
| | | * |
| | | * @param redisHelper |
| | | * @param finOrgService |
| | | * @return |
| | | * @date 2023-07-05 |
| | | */ |
| | | @Bean |
| | | public FinOrgCacheProvider finOrgCacheProvider(RedisHelper redisHelper, FinOrgService finOrgService){ |
| | | public FinOrgCacheProvider finOrgCacheProvider(RedisHelper redisHelper, FinOrgService finOrgService) { |
| | | RedisFinOrgCache cache = new RedisFinOrgCache(); |
| | | cache.setRedisHelper(redisHelper); |
| | | cache.setFinOrgService(finOrgService); |
| | |
| | | * @Date 2023/7/18 13:38 |
| | | */ |
| | | @Bean |
| | | public FinSysTenantUserCacheProvider finSysTenantUserCacheProvider(RedisHelper redisHelper, FinSysTenantUserServiceImpl finSysTenantUserService){ |
| | | public FinSysTenantUserCacheProvider finSysTenantUserCacheProvider(RedisHelper redisHelper, |
| | | FinSysTenantUserService finSysTenantUserService) { |
| | | RedisFinSysTenantUserCache cache = new RedisFinSysTenantUserCache(); |
| | | cache.setRedisHelper(redisHelper); |
| | | cache.setFinSysTenantUserService(finSysTenantUserService); |
| | |
| | | * @Date 2023/7/18 13:38 |
| | | */ |
| | | @Bean |
| | | public TokenCacheProvider tokenCacheProvider(RedisHelper redisHelper){ |
| | | public TokenCacheProvider tokenCacheProvider(RedisHelper redisHelper) { |
| | | RedisTokenCache cache = new RedisTokenCache(); |
| | | cache.setRedisHelper(redisHelper); |
| | | return cache; |
| | |
| | | |
| | | /** |
| | | * Redis实现的业务机构缓存配置。 |
| | | * |
| | | * @param redisHelper |
| | | * @param finSysTenantService |
| | | * @return |
| | | * @date 2023-07-05 |
| | | */ |
| | | @Bean |
| | | public FinSysTenantCacheProvider finSysTenantCacheProvider(RedisHelper redisHelper, FinSysTenantServiceImpl finSysTenantService){ |
| | | public FinSysTenantCacheProvider finSysTenantCacheProvider(RedisHelper redisHelper, |
| | | FinSysTenantService finSysTenantService) { |
| | | RedisFinSysTenantCache cache = new RedisFinSysTenantCache(); |
| | | cache.setRedisHelper(redisHelper); |
| | | cache.setFinSysTenantService(finSysTenantService); |