title: Shared Config Between SOME Spring Boot Services
body: <p>This question is similar to (but different in the aim): <a href="https://stackoverflow.com/questions/45499251/shared-configat-git-between-spring-boot-services">Shared Config(at git) between SPring Boot Services</a> so I will make use of the example the OP wrote there. </p>
  
  <p>In my case I am using Spring Cloud Config Server with the Vault as backend, but for the sake of argument I will describe it as if it were in git. So imagine I have 4 Services: <code>A, B, C and D</code>.</p>
  
  <p>And I have the following configs:</p>
  
  <pre><code>- A-prod.properties
  - A-dev.properties
  - B-prod.properties
  - B-dev.properties
  - C-prod.properties
  - C-dev.properties
  - D-prod.properties
  - D-dev.properties
  - application-prod.properties
  - application-dev.properties
  </code></pre>
  
  <p>Now according to the <a href="https://cloud.spring.io/spring-cloud-static/spring-cloud-config/2.0.2.RELEASE/single/spring-cloud-config.html#_sharing_configuration_with_all_applications" rel="nofollow noreferrer">docs</a> I will have one of the services, let's say <code>Service C</code> getting his properties from <code>C-(ENV).properties</code> as well as <code>application-(ENV).properties</code>. Similarly the same with the others, i.e. everyone gets their own file and everything on <code>application.properties</code>.</p>
  
  <p><strong>My question is</strong>:
  Is it possible to have for example a "semi-global" shared properties, e.g. a file that <code>A and C</code> share some config and another that <code>B and D</code> share some config?</p>
  
  <p>An usage example would be DB Connection Credentials, where two services make use of one set of credentials, and the others another one.</p>
  
  <p>I have been trying to find infos about this and doing some tests, but nothing that got me anywhere...</p>