其他程序语言客户端如何使用 Spring Cloud Config Server? [英] How other program language clients use Spring Cloud Config Server?
问题描述
'Spring-Cloud-Config-Server' 文档中提到,
There is a mention in the 'Spring-Cloud-Config-Server' documentation that says,
要在应用程序中使用这些功能,只需将其构建为 Spring启动应用程序
To use these features in an application, just build it as a Spring Boot application
这是否意味着我的客户端应用程序也需要是 Spring Boot 应用程序?我不能让非 Java 应用程序通过 RESTService 调用访问配置服务器中的属性吗?如果数据是以 JSON 格式接收的,我总是可以在我的非 Java 应用程序中使用 JSON 解析器来解析和使用数据.
Does this mean that my client app also needs to be a Spring Booot application ? Can't i have a Non-Java application accesing the properties in the Config Server via RESTService calls ? If the data is receieved in JSON format, I could always have a JSON parser in my non-java application to parse and use the data.
推荐答案
标准 uri 是 /{name}/{profiles}
和 /{name}/{profiles}/{标签}
.这些返回一个针对 Spring Cloud 配置客户端优化的 json 格式.
The standard uri's are /{name}/{profiles}
and /{name}/{profiles}/{label}
. These return a json format optimized for the spring cloud config client.
{name}
是应用程序名称.{profiles}
是一个逗号分隔的配置文件列表.{label}
是使用 git 或 svn 时的分支名称.
{name}
is the application name. {profiles}
is a comma separated list of profiles. {label}
is the branch name when using git or svn.
以下返回针对这些格式优化的其他格式的数据:
The following return the data in other formats optimized for those 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
这篇关于其他程序语言客户端如何使用 Spring Cloud Config Server?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!