Skip to content

Commit

Permalink
Merge pull request #484 from dmak/config-file-property-variable
Browse files Browse the repository at this point in the history
The property value for config file path is extracted into the separate variable.
  • Loading branch information
elandau authored Nov 11, 2017
2 parents 06a02fb + 07f3471 commit 97a3184
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,18 @@ public class URLConfigurationSource implements PolledConfigurationSource {
/**
* Default configuration file name to be used by default constructor. This file should
* be on the classpath. The file name can be overridden by the value of system property
* <code>configurationSource.defaultFileName</code>
* {@link #DEFAULT_CONFIG_FILE_PROPERTY}.
*/
public static final String DEFAULT_CONFIG_FILE_NAME = "config.properties";

public static final String DEFAULT_CONFIG_FILE_FROM_CLASSPATH =
System.getProperty("archaius.configurationSource.defaultFileName") == null ? DEFAULT_CONFIG_FILE_NAME : System.getProperty("archaius.configurationSource.defaultFileName");


/**
* System property name to be used to learn the location of the configuration file name
* on the classpath.
*/
public static final String DEFAULT_CONFIG_FILE_PROPERTY = "archaius.configurationSource.defaultFileName";

public static final String DEFAULT_CONFIG_FILE_FROM_CLASSPATH = System.getProperty(DEFAULT_CONFIG_FILE_PROPERTY, DEFAULT_CONFIG_FILE_NAME);

private static final Logger logger = LoggerFactory.getLogger(URLConfigurationSource.class);

/**
Expand Down

0 comments on commit 97a3184

Please sign in to comment.