title: How to include external configuration resources to classpath in Spring (Spring Boot)?
body: <p>I have 3rd party library that is configured by placing properties file on the root of the classpath. That library is using <code>getClass().getResourceAsStream("/file.properties")</code> to load that file. As it is 3rd party, <strong>it is unmodifiable</strong>. I have placed that configuration file into <strong>external</strong> <code>resources</code> directory (not to be mistaken with <code>resources</code> from eg. Maven's or Gradle's directory structure.</p>
  
  <p>Directory structure is like this.</p>
  
  <p><a href="https://i.stack.imgur.com/Y2Fvb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y2Fvb.png" alt="Dir stricture"></a></p>
  
  <p>How to run/configure Spring boot to include content of <code>resources</code> directory to the classpath so <code>getResourceAsStream</code> wil work? </p>
  
  <p>On SE application I would simply do <code>java -jar myApp.jar</code> with classpath in MANIFEST and that would work. </p>
  
  <p>EDIT:</p>
  
  <p>Just a word of clarification - putting configuration file inside project resources (along sources) is missing the whole point. I want to keep configuration externalized.</p>