@Configuration public class CacheConfig { @Bean public CacheManager redisCacheManager(RedisConnectionFactory connectionFactory) { var config = RedisCacheConfiguration.defaultCacheConfig(); return RedisCacheManager.builder(connectionFactory) .cacheDefaults(config) .build(); } }