@ConditionalOnMissingBean(name = CasEventRepository.BEAN_NAME)
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public CasEventRepository casEventRepository(
            final ConfigurableApplicationContext applicationContext) {
            return BeanSupplier.of(CasEventRepository.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> NoOpCasEventRepository.INSTANCE)
                .otherwiseProxy()
                .get();
        }
This is {@link CasCoreEventsAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-events/src/main/java/org/apereo/cas/config/CasCoreEventsAutoConfiguration.java