code: public BaseConfigurationPropertiesLoader getLoader(final Resource resource,
                                                         final String name) {
          val filename = StringUtils.defaultString(resource.getFilename()).toLowerCase();
  
          if (filename.endsWith(".properties")) {
              return new SimpleConfigurationPropertiesLoader(this.configurationCipherExecutor, name, resource);
          }
          if (filename.endsWith(".groovy")) {
              return new GroovyConfigurationPropertiesLoader(this.configurationCipherExecutor, name,
                  getApplicationProfiles(environment), resource);
          }
          if (filename.endsWith(".yaml") || filename.endsWith(".yml")) {
              return new YamlConfigurationPropertiesLoader(this.configurationCipherExecutor, name, resource);
          }
          throw new IllegalArgumentException("Unable to determine configuration loader for " + resource);
      }
docs: Gets loader.
  
  @param resource the resource
  @param name     the name
  @return the loader