private MongoMappingContext mongoMappingContext() {
        val mappingContext = new MongoMappingContext();
        mappingContext.setInitialEntitySet(getInitialEntitySet());
        mappingContext.setSimpleTypeHolder(customConversions.getSimpleTypeHolder());
        mappingContext.setFieldNamingStrategy(MongoDbConnectionFactory.fieldNamingStrategy());
        return mappingContext;
    }
Build mongo template.

@param mongoClient the mongo client
@param mongo       the mongo
@return the cas mongo operations
support/cas-server-support-mongo-core/src/main/java/org/apereo/cas/mongo/MongoDbConnectionFactory.java