How do other clients in the program language use Spring Cloud Config Server?

The Spring-Cloud-Config-Server documentation mentions that

To use these features in an application, just create it as Spring

Does this mean that my client application should also be a Spring Booot application? Can I have a non-Java application accessing properties on the configuration server through RESTService calls? If the data is received in JSON format, I can always have a JSON parser in my non-Java application to parse and use the data.

+1
source share
3 answers

The standard uri are /{name}/{profiles} and /{name}/{profiles}/{label} . They return a json format optimized for the spring configuration client.

{name} is the name of the application. {profiles} - a list of profiles, separated by commas. {label} - the name of the branch when using git or svn.

Listed below are data in other formats optimized for these formats:

  • /{name}-{profiles}.properties
  • /{label}/{name}-{profiles}.properties
  • {name}-{profiles}.json
  • /{label}/{name}-{profiles}.json
  • /{name}-{profiles}.yml
  • /{name}-{profiles}.yaml
  • /{label}/{name}-{profiles}.yml
  • /{label}/{name}-{profiles}.yaml
+2
source

Other languages ​​can use it as a recreation resource. The client can create a URL based on the application, environment, and key and make a request to the cloud configuration server.

+1
source

I still recommend that between the java library (spring cloud client). Although you can manually parse the JSON response, but you need to make sure that you get the key / value from the first occurrence. In addition, you will have to write your own logic to replace the values ​​from the config server if they are overridden by your own cmd line or properties file.

-1
source

All Articles