Loading property file on openshift / linux hosting (Spring) -
i loading application configuration property file this
propertysourcesplaceholderconfigurer configurer = new propertysourcesplaceholderconfigurer(); configurer.setlocation(new classpathresource(propertiesfilename));
this code working fine on local environment , have property file here
but on production not able pick property file. should keep works on both local , production same code.
unzip production war , see if properties file there. if it's not means build process logic (maven profile, ant if clause) removes file depending on environment.
try check pom.xml or ant.xml files resource filtering functionality might have removed file, , replaced example app-prod.properties
.
Comments
Post a Comment