@Override
  public PropertySource load() {
    Map<String, Object> propertyMap = new HashMap<String, Object>();
    for (String file : getAllMatchedConfigFiles()) {
      Resource resource = resourceLoader.getResource(file);
      if (!resource.exists()) {
        continue;
      }
      for (PropertySourceResolver resolver : resolvers) {
        if (resolver.canResolvedExtension(resource.getExtension())) {
          try {
            propertyMap.putAll(resolver.resolve(resource.getInputStream()));
          } catch (IOException e) {
            throw new ConfigurationResolveException("load environment configuration failed.", e);
          }
        }
      }
    }
    PropertySource propertySource = new PropertySource();
    propertySource.addProperties(propertyMap);
    return propertySource;
  }
Abstract property loader to load environment configuration from file.
src/main/java/com/eudemon/ratelimiter/env/loader/AbstractFilePropertySourceLoader.java