feat(redis): 注解支持多租户缓存

1.增加多租户Cache
2.修复Mac M1启动报错
This commit is contained in:
airhead
2022-08-23 16:56:51 +08:00
parent dd6dc2ac3d
commit 0e1babd7f4
5 changed files with 63 additions and 11 deletions

View File

@ -32,6 +32,12 @@
<artifactId>spring-boot-starter-cache</artifactId> <!-- 实现对 Caches 的自动化配置 -->
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.75.Final</version>
</dependency>
</dependencies>
</project>

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.framework.redis.config;
import org.springframework.boot.autoconfigure.cache.CacheProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -13,6 +14,7 @@ import org.springframework.data.redis.serializer.RedisSerializer;
* Cache 配置类,基于 Redis 实现
*/
@Configuration
@EnableConfigurationProperties({CacheProperties.class})
@EnableCaching
public class YudaoCacheAutoConfiguration {