@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public CasEventRepository casEventRepository(
        final CasConfigurationProperties casProperties,
        @Qualifier("mongoEventRepositoryFilter")
        final CasEventRepositoryFilter mongoEventRepositoryFilter,
        @Qualifier("mongoEventsTemplate")
        final MongoOperations mongoEventsTemplate) {
        val mongo = casProperties.getEvents().getMongo();
        return new MongoDbCasEventRepository(mongoEventRepositoryFilter, mongoEventsTemplate, mongo.getCollection());
    }
This is {@link CasMongoDbEventsAutoConfiguration}, defines certain beans via configuration
while delegating some to Spring namespaces inside the context config file.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-events-mongo/src/main/java/org/apereo/cas/config/CasMongoDbEventsAutoConfiguration.java