1

One of our apps uses Spring Cloud Config Server to store client configs. I.e. not the configs needed to start the, but the configs sent later to client. Basically, JSONs. It's a controversial solution, but it is as it is. It uses Spring Cloud Config Server client to fetch them directly from the server.

The problem is that it fetches them one by one and that the number of configs is huge (100th of parameters). As a result, this fetching process takes too long.

Is there a way to fetch multiple configs at once in one request in Spring Cloud Config Server?

madhead
  • 31,729
  • 16
  • 153
  • 201

1 Answers1

0

Yes you can do that. Its designed for config sharing between apps.

In your bootstrap.yml, add all the configurations you want to fetch from server in the spring.cloud.config.name property as following:

spring:
  cloud:
     config:
        uri: xxxxxxx
        .....
        name: myconfiguration1, myconfiguration2,...etc

keep in mind that all depends on the activated profile. So if your spring.profiles.active is dev i.e, the configurations that will be fetched all myconfiguration1-dev.yml, myconfiguration2-dev.yml...etc