@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public ThrottledRequestExecutor throttledRequestExecutor(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier("bucket4jThrottledRequestConsumer")
        final BucketConsumer bucket4jThrottledRequestConsumer) {
        return BeanSupplier.of(ThrottledRequestExecutor.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> new Bucket4jThrottledRequestExecutor(bucket4jThrottledRequestConsumer))
            .otherwiseProxy()
            .get();
    }
This is {@link CasBucket4jThrottlingAutoConfiguration}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-throttle-bucket4j/src/main/java/org/apereo/cas/config/CasBucket4jThrottlingAutoConfiguration.java