Commit c097f26c authored by Matija Obreza's avatar Matija Obreza

Print all environment var info

parent 1d4a72d8
......@@ -35,7 +35,13 @@ public class SpringProperties {
@Bean
public PropertyPlaceholderConfigurer propertyPlaceholderConfigurer() {
for (String envvar : System.getenv().keySet()) {
System.err.println("ENV " + envvar + "=" + System.getenv(envvar));
}
for (Object prop : System.getProperties().keySet()) {
System.err.println("PROP " + prop + "=" + System.getProperty(prop.toString()));
}
final PropertyPlaceholderConfigurer propertyPlaceholderConfigurer = new PropertyPlaceholderConfigurer();
// Need to ignore "genesys.properties" if not found
propertyPlaceholderConfigurer.setIgnoreResourceNotFound(true);
......@@ -52,11 +58,13 @@ public class SpringProperties {
if (StringUtils.isNotBlank(extraConfigFile)) {
File f = new File(extraConfigFile);
System.err.println("Attempting to read properties from config.file=" + extraConfigFile + " at " + f.getAbsolutePath());
if (f.exists() && f.canRead()) {
System.err.println("Including properties from config.file=" + extraConfigFile);
System.err.println("Including properties from config.file=" + f.getAbsolutePath());
locations.add(new FileSystemResource(extraConfigFile));
} else {
System.err.println("Cannot read properties from config.file=" + extraConfigFile);
System.err.println("Cannot read properties from config.file=" + f.getAbsolutePath());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment