private Set<Class<?>> getInitialEntitySet() {
        return getMappingBasePackages().stream()
            .flatMap(basePackage -> scanForEntities(basePackage).stream())
            .collect(Collectors.toSet());
    }
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