@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @ConditionalOnMissingBean(name = "consentRedisTemplate")
    public CasRedisTemplate consentRedisTemplate(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier("redisConsentConnectionFactory")
        final RedisConnectionFactory redisConsentConnectionFactory) {
        return BeanSupplier.of(CasRedisTemplate.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> RedisObjectFactory.newRedisTemplate(redisConsentConnectionFactory))
            .otherwiseProxy()
            .get();
    }
This is {@link CasConsentRedisAutoConfiguration}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-consent-redis/src/main/java/org/apereo/cas/config/CasConsentRedisAutoConfiguration.java