I'm using spring 3.0 and trying to load a properties file:
<context:property-placeholder location="classpath:myFile.properties" />
...
<property name="userName" value="${myVariable}" />
...
Using a xpto.properties
, when I try to use any parameter from this file if shows me the error:
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'myBean' defined in class path resource [myApplicationContext.xml]: Could not resolve placeholder 'myVariable'...
The strange thing is if I use file with the very specific name jdbc.properties
it works!
I searched for any reference or filter of jdbc.properties
in my project and found nothing.
ps. one important thing: properties file is in the classpath, the error is not to load the file, it is when I trying to use any variable from this file (except if file name is jdbc)
Can someone give me a light?