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.source: http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/PropertySource.html