@Override
    public PropertySource<?> locate(final Environment environment) {
        if (environment instanceof ConfigurableEnvironment) {
            val sourceName = MongoDbPropertySource.class.getSimpleName();
            val composite = new CompositePropertySource(sourceName);
            val source = new MongoDbPropertySource(sourceName, mongo);
            composite.addFirstPropertySource(source);
            return composite;
        }
        return null;
    }
This is {@link MongoDbPropertySourceLocator}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-configuration-cloud-mongo/src/main/java/org/apereo/cas/MongoDbPropertySourceLocator.java