You must specify the correct resource for the value property. There are several built-in implementations , for example:
- ClassPathResource:
value="classpath:/META-INF/config.properties" - FileSystemResource:
value="file:C:/foobar/config.properties"
If you want to place the file outside the library, you can use a system property (e.g. -DpropertyFile=C:/loremIpsum/config.properties) to specify a path, e.g.
value="file:${propertyFile}"
since spring 3.0.? even with default value
value="file:${propertyFile:C:/foobar/config.properties}"
( OSGi , . , ClassPathResource / OSGi.)