I have a main conf file which I load using apache common configuration class. I have a requirement where user can specify a conf file and values in those file will override the
With cfg4j:
// Specify which files to load. Configuration from both files will be merged.
ConfigFilesProvider configFilesProvider = () -> Arrays.asList(new File("application.properties"), new File("otherConfig.properties"));
// Use local files as configuration store
ConfigurationSource source = new FilesConfigurationSource(configFilesProvider);
Then use it in a standard way to get properties out.