title: spring boot external config
body: <p>I am trying to load an external properties file into my spring boot app.
  initially I used @PropertySource in the config class.
  but now I want to remove this annotation so the class is not dependent on the location.
  so I tried to use:</p>
  
  <pre><code>java -jar my-boot-ws.war --SPRING_CONFIG_NAME=file:///Users/TMP/resources/
  </code></pre>
  
  <p>based on this <a href="http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html" rel="noreferrer">http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html</a> documentation but I get the following error:</p>
  
  <pre><code>Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder
  </code></pre>
  
  <p>using the annotation works fine but I would really like to move away from that.
  any help on this would be great</p>
  
  <p>Thanks</p>
  
  <p>******  CORRECTION  *******</p>
  
  <p>Sorry copy paste error the above command was supposed to be:</p>
  
  <pre><code>java -jar my-boot-ws.war --spring.config.location=file:///Users/TMP/resources/
  </code></pre>
  
  <p>I'm not trying to change the name of the config file just add an additional location.
  As explained here:</p>
  
  <blockquote>
    <p>If spring.config.location contains directories (as opposed to files)
    they should end in / (and will be appended with the names generated
    from spring.config.name before being loaded).</p>
  </blockquote>
  
  <p>I interpreted this as saying that the file ${spring.application.name}.properties would be loaded from the --spring.config.location passed in from the command line</p>