Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List final list of properties - Spring Cloud Config Server

Spring Cloud Config Server accepts multiple profile and returns the properties for all the profiles when I access the /env endpoint of the application. The response lists the properties specific to each profile. If same property is present in 2 different property files , the one that is defined last takes precedence. Is there a way to get the final list of property key and values that will be used by the application?

like image 661
Punter Vicky Avatar asked May 22 '17 21:05

Punter Vicky


People also ask

How do I find properties in config server?

We can build the config server endpoint URL in this manner: http://{Config server URL}:{Port}/{ServiceID}/{Profile} So if we want to see all the properties value in config server for the MicroServiceEmployeeSearchService, the URL should be http://localhost:9090/EmployeeSearchService/default.

What are the features of spring cloud config server?

"Spring cloud config server" provides client-side support for externalized configuration in a distributed system. With the distributed configurations, we have a central place to manage external properties for applications across all environment.

Where are cloud properties stored in spring boot?

Creating Spring Cloud Configuration Server Gradle users can add the below dependency in your build. gradle file. Now, add the @EnableConfigServer annotation in your main Spring Boot application class file. The @EnableConfigServer annotation makes your Spring Boot application act as a Configuration Server.


1 Answers

For Cloud Config Client Application

I've tried different ways and found the following (accidentally):

GET /env/.* returns full list of configuration properties

For Cloud Config Server Application

It turns out this is already implemented, but not documented well. All you need is to request json, yml or properties according to the patterns:

/{application}-{profile}.{ext}
/{label}/{application}-{profile}.{ext}
like image 92
Vyacheslav Shvets Avatar answered Oct 26 '22 08:10

Vyacheslav Shvets