title: Spring Boot : how to use @PropertySource to point to a text file outside the jar?
body: <p>I am working on a standalone Swing/Spring Boot application which will be deployed in a number of different environments.  For that reason, i need Spring to load an external config file where the user will enter the database credentials.  Everything works fine when i annotate my configuration class with and when i run it from Netbeans:</p>
  
  <pre><code>@PropertySource("classpath:config.properties")
  </code></pre>
  
  <p>In this case, the text file is fetched from the src/main/resources folder and the application can use the credentials to launch.  My question concerns the packaged JAR file that will ultimately be deployed.  Since the classpath is INSIDE the JAR, how are the users expected to be able to edit its content?  </p>
  
  <p>Is there a way for @PropertySource to point outside the packaged JAR, for example using an environment variable which I am totally willing to add as a requirement for the app to work?</p>