|
@ -69,7 +69,14 @@ public class AdditionalPropertiesConfig implements EnvironmentPostProcessor { |
|
|
for (String prefix : resourceFilePrefixes) { |
|
|
for (String prefix : resourceFilePrefixes) { |
|
|
try { |
|
|
try { |
|
|
ClassPathResource classPathResource = new ClassPathResource(prefix + "-" + profile + ".properties"); |
|
|
ClassPathResource classPathResource = new ClassPathResource(prefix + "-" + profile + ".properties"); |
|
|
classPathResource.getFile().canRead(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
* Do not use getFile() method. |
|
|
|
|
|
* Instead, use getInputStream(), required by Tomcat/WAR deployment |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
classPathResource.getInputStream(); |
|
|
|
|
|
|
|
|
classPathResources.add(classPathResource); |
|
|
classPathResources.add(classPathResource); |
|
|
System.out.printf( |
|
|
System.out.printf( |
|
|
"Profile properties file found: %s\n", |
|
|
"Profile properties file found: %s\n", |
|
|