@Bean
        @ConditionalOnMissingBean(name = "inMemoryAuditEventRepository")
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public AuditEventRepository inMemoryAuditEventRepository(
            final ConfigurableApplicationContext applicationContext) {
            return BeanSupplier.of(AuditEventRepository.class)
                .when(CONDITION_AUDIT.given(applicationContext.getEnvironment()))
                .supply(InMemoryAuditEventRepository::new)
                .otherwiseProxy()
                .get();
        }
This is {@link CasCoreAuditAutoConfiguration}.

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