I have following spring configuration for resource files, it works perfectly well when i execute in eclipse environment. But when i package the application into JAR and execute it does not file properties file resource.
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="true" />
<property name="locations">
<list>
<value>classpath:Application.properties</value>
<value>classpath:database.properties</value>
</list>
</property>
</bean>
<!-- define the properties file to use -->
<util:properties id="appProperties" location="classpath:Application.properties" />
When i see the jar file all files are present. I am using maven to build assembly.
Project structure:
ProjName | |--main |-- java |-- resources
Also, i am using maven config using this link (http://stackoverflow.com/questions/13615634/maven-build-assembly-with-dependencies)