spring cloud config : how to use multiple configs
<h3>What I want to try:</h3>
<p>I want to try the <code>spring cloud config</code> for microservice project where I have a <code>common config</code> for all services and <code>multiple configs</code> for each service.<br />
I got idea on how to use multiple <code>profiles</code> using <code>spring.profiles.active</code> and <code>include</code>. I am trying to understand how can I load multiple configs on config client?</p>
<h3>What I have:</h3>
<p>In my git repo I have <code>spring-config-repo</code> where I have ...</p>
<pre><code>application.yml
orderclient.yml
subscriberclient.yml
jmsclient.yml
productclient.yml
</code></pre>
<p>I have my <code>config Server</code> pointed to my config repo.</p>
<pre><code>spring:
  application:
  name: config-service
  cloud:
   config:
    server:
      git:
        uri: https://github.com/&lt;user&gt;/spring-config-repo

server:
 port: 8888
</code></pre>
<p>I have my <code>spring client</code> where I want to use multiple configs. Here in my case for <code>orderService</code> I want to load <code>application.yml,orderclient.yml,jmsconfig.yml</code> and For Product microService I need 'orderconfig.yml,jmsclient.yml,productclient.yml'</p>
<pre><code>spring:
application:
  name: orderclient
profiles:
  active: test
cloud:
  config:
    uri: http://localhost:8888

###Any kind of config properties to load jmsclient, productclient?
</code></pre>
<p>Above I can access properties from orderclient.yml.</p>
<h2>My Question:</h2>
<h3>Question1:</h3>
<p>How to access properties of <code>jmsclient.yml,productclient.yml</code> in <code>orderclient</code> application.</p>
<h3>Question2:</h3>
<p>Is there anyway to get list of all <code>propertySources.name</code> exposed by config server? where in above case it should dispaly</p>
<pre><code>&quot;propertySources&quot;: {
  &quot;name&quot;: &quot;https://github.com/&lt;&gt;/spring-config-repo/aplication.yml&quot;,
     &quot;profiles&quot;: &lt;available profiles for this say&gt; Dev, Test,
  &quot;name&quot;: &quot;https://github.com/&lt;&gt;/spring-config-repo/orderclient.yml&quot;,
     &quot;profiles&quot;: &lt;available profiles for this say&gt; Dev, Test
  &quot;name&quot;: &quot;https://github.com/&lt;&gt;/spring-config-repo/jmsclient.yml&quot;,
     &quot;profiles&quot;: &lt;available profiles for this say&gt; Dev, Test
 ....}
</code></pre>
<p>Please let me know if my question is not clear or need more information. Thanks.</p>