My application gets the location of a properties file from an environment variable, and it may not be in the WEB-INF folder. I'm getting file not found, but this file definitely exists already. I don't want to use the classpath:
prefix, and I don't want it to be relative to the app root.
@PropertySource("${propfile}")
public class ... {
To use an absolute path, try file:
at the beginning.
@PropertySource("file:${propfile}")
source: http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/PropertySource.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With