@Bean
    @Primary
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public MongoTemplate mongoTemplate(final MongoDatabaseFactory factory,
                                       final MongoConverter converter) {
        return new MongoTemplate(factory, converter);
    }
This is {@link CasMongoSessionAutoConfiguration}.

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