mirror of
https://github.com/lightbend/config.git
synced 2025-01-29 05:30:08 +08:00
rename method
This commit is contained in:
parent
af6b7b8a6a
commit
3be726d918
@ -1091,12 +1091,12 @@ public final class ConfigFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse only any application overrides (those specified by config.{resource,file,url}), returning
|
||||
* Parse only any application replacement (specified by one of config.{resource,file,url}), returning
|
||||
* an empty Config if no overrides were set.
|
||||
* @param parseOptions parse options
|
||||
* @return the parsed configuration
|
||||
*/
|
||||
public static Config parseApplicationOverride(ConfigParseOptions parseOptions) {
|
||||
public static Config parseApplicationReplacement(ConfigParseOptions parseOptions) {
|
||||
ClassLoader loader = parseOptions.getClassLoader();
|
||||
|
||||
if (loader == null)
|
||||
|
@ -8,11 +8,11 @@ package com.typesafe.config;
|
||||
public class DefaultConfigLoadingStrategy implements ConfigLoadingStrategy {
|
||||
@Override
|
||||
public Config parseApplicationConfig(ConfigParseOptions parseOptions) {
|
||||
Config overrideConfig = ConfigFactory.parseApplicationOverride(parseOptions);
|
||||
if (overrideConfig.isEmpty()) {
|
||||
Config applicationReplacement = ConfigFactory.parseApplicationReplacement(parseOptions);
|
||||
if (applicationReplacement.isEmpty()) {
|
||||
return ConfigFactory.parseResourcesAnySyntax("application", parseOptions);
|
||||
} else {
|
||||
return overrideConfig;
|
||||
return applicationReplacement;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user