My question is an exact duplicate of this question : Spring application context external properties?
This is how I injected the props file before :
<util:properties id="smrProps" location="classpath:/spring/SomeProps.properties" />
But for the life of me, I cant figure out what to use in location
when I want to inject a properties file which will be in the same directory as a runnable jar. I know where the classpath points and my props is just one level up, so I even tried classpath:/../SomeProps.properties
assuming it will look in the parent folder, but no luck.
For ex if jar is in : C:\temp\some.jar
and properties file is in C:\temp\SomeProps.properties
If some.jar is in temp, then SomeProps.properties will also be in temp. Of course, I cannot be using C:\temp\SomeProps.properties in location
Can someone please guide me on how I could use this props file ?