问题标签 [spring-cloud-config-server]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
spring - 如何使用 Spring cloud config server 来服务 web-ui 配置
我有几个绑定了 Web 应用程序的服务(微服务)。在我的服务中,有一个端点来提供 UI 配置。这意味着当有人访问该站点时,会调用配置端点并且 UI 会获取所需的配置。
顺便说一句,国家代码和语言环境被传递到这个配置端点,该端点为该用户定制配置。(意味着我们必须进行一些验证以及在原始配置中填充一些占位符)。
考虑到这一点,在我的情况下,如何利用 Spring Cloud 配置进行 UI 配置?如果为此目的有更好的方法,请告诉我。
提前致谢
spring-cloud - 使用子上下文路径制作嵌入式 Spring Cloud Config Server
为了拥有 Spring Cloud Config Server / Spring Boot Admin 多合一组合,我需要为配置服务器 API 声明一个全局子路径,就像我对 Spring Boot Admin 所做的那样(spring.boot.admin.context -路径=/仪表板)。我找不到与配置服务器等效的上下文路径更改器,它的 API 显然干扰了我隔离它们的尝试。我当然可以使用单独的项目,但在此之前我想检查一下我没有错过任何功能。感谢您的任何想法。
spring - Spring Cloud Config Server - 可以使用 Git 后端引用文件
作为一个组织单位,我们为所有带有 Git 后端的 Spring 微服务设置了 Spring Cloud Config Server(使用 bitbucket.org)。我们还使/actuator/refresh
端点能够即时刷新我们@ConfigurationProperties
,而无需重新部署任何微服务。决定不使用 Spring Cloud Bus 以确保我们可以完全控制何时刷新哪个应用程序,以防万一。
现在是我们的问题。我们有一些将查询作为配置的微服务。这些可能非常麻烦,我们希望将此类查询放在一个文件中,并让 Spring Cloud Config Server 引用它们。有没有人设法提出这样的解决方案或类似的解决方案?即使被引用,我们仍然必须能够即时刷新此类配置。因此,这些不能与应用程序本身打包在一起。
spring-boot - 配置客户端的自动刷新在 Spring Boot 2 中不起作用
我正在尝试将带有Spring Cloud Config Server
and RabbitMQ
as Spring Cloud Bus
(基于Spring Boot 1.5.22.RELEASE
and Spring Cloud Brixton.SR7
)的简单示例代码迁移到 Spring Boot 2.2.6.RELEASE
and Spring Cloud Hoxton.SR3
。该示例由一个配置服务器、一个配置客户端、GitLab
作为 SCM 和RabbitMQ
(3.8 - Erlang 22.1.5) 组成。代码正在编译,启动,push webhook被触发,也可以在服务端和客户端的日志中看到。
问题是在 Git 中更新的属性没有在客户端中更新。在它的基础上Spring Boot 1.5.22.RELEASE
,Spring Cloud Brixton.SR7
它工作可靠。但如果我curl -X POST http://localhost:8889/actuator/bus-refresh
手动操作,属性将被更新。
可能是什么问题或我忘记配置哪个属性?
这是我的配置/代码:
GitLab(作为 Docker 容器启动) 推送 WebHook:http://user:password@localhost:8889/monitor
RabbitMQ(作为 Docker 容器启动) 无特殊配置
pom.xml
Config服务器和客户端的根模块:
pom.xml
配置服务器:
pom.xml
配置客户端:
application.yml
配置服务器:
application.yml
配置客户端:
bootstrap.properties
配置客户端:
配置服务器:
配置客户端:
提前谢谢了
spring-boot - Spring Cloud Config:调用执行器/刷新端点时,密码未在 Spring Cloud 配置客户端中使用 jasypt 解密
我正在使用 git 作为存储库设置 spring 云配置服务器(2.2.0.RELEASE)和配置客户端。此外,我正在使用 jasypt-spring-boot-starter (2.1.2) 对属性文件中的值进行加密。
示例 - 在 app.properties 内
当配置第一次从配置服务器加载时,加密值(即密码)在配置客户端得到正确解密,但后来当我调用执行器/刷新端点时,加密值按原样传递而不被解密配置客户端。
在调用刷新端点后,jasypt 是否有办法再次解密 spring config 客户端中的属性?
spring-cloud - Spring Cloud 配置客户端未从配置服务器中选择值
我的配置客户端没有从配置服务器中选择属性值。
以上配置服务器端点正在为配置客户端返回正确的值,
配置客户端 bootstrap.properties
配置客户端日志
git - Spring Cloud Config - Git 存储库错误
Spring Cloud 配置框架:
我正在尝试将 java 项目中的 spring 云配置与后端存储库git集成,后者是 bitbucket。基本上,我在不同的场合更频繁地遇到两个错误。
在上述情况下,它使用缓存版本和 tomcat/undertow 服务器启动没有任何问题。
版本:
git version 2.24.0
错误 1:git-upload-pack
2020-04-11 00:00:20 - 警告克隆到基本目录时出错。
启动spring cloud config server,我随机收到这个错误。在深入研究了这个问题后,我发现bitbucket不支持git-upload-pack 。但是2年前在这里报道过,并建议恢复GIT版本。
错误 2:不支持身份验证
org.eclipse.jgit.api.errors.TransportException: https://bitbucket.org/user/repo.git: authentication not supported
当点击/refresh
on actuator 以从远程配置存储库中获取刷新的属性时,我得到了上述错误。有时它工作时没有任何错误,有时它会抛出错误。
curl localhost:8060/refresh -d {} -H "Content-Type: application/json"
执行器刷新命令错误:
注意:作为旁注,我已经单独克隆了指定的存储库进行测试,它可以正常工作,没有任何身份验证问题。
spring-boot - Spring Boot 配置客户端无法解析配置服务器
配置客户端无法解析配置属性,也无法连接到配置服务器。这是我的服务 application.properties 文件:
pom.xml 中的依赖关系:
配置服务器和发现服务器启动成功,其他服务注册成功。
这是配置服务器 application.properties 文件:
myConfig 文件夹中的 application.properties 文件:
其他服务已成功注册并获取配置服务器:
c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
amazon-s3 - 无法通过 S3 后端弹簧配置服务器获取分层属性
我创建了带有 s3 后端的 spring 配置服务器,如下所述: https ://cloud.spring.io/spring-cloud-config/reference/html/#_aws_s3_backend
我在 my-config-server s3 存储桶中创建了 4 个文件:
当我使用 dev 配置文件运行客户端应用程序时,我只得到了client-app-dev.properties 属性。
如果没有在client-app-dev.properties中定义,我是否有可能获得client-app-default.properties、app-dev.properties和app-default.properties 属性
换句话说,是否可以支持以下层次结构:
例如:
当我使用开发配置文件运行客户端应用程序时,我会得到什么:
它适用于常规的 spring 配置服务器,但我没有成功支持 s3。它直接转到特定的应用程序和特定的配置文件
java - Spring Cloud Config @Value throwing 找不到能够从类型 [java.util.LinkedHashMap ] 转换为类型 [java.lang.String]的转换器
我已成功建立与 Spring Cloud 配置服务的连接,以application.yml
在配置存储库的外部文件中读取我的道具。但是,当它尝试读取值时,我得到了这个错误
例外:
Error creating bean with name 'securityConfig': Injection of autowired dependencies failed; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.util.LinkedHashMap<?, ?>] to type [java.lang.String]
我正在尝试阅读的配置类和值:
Application.yml 是外部的:
引导程序.yml
Spring Boot 是父级和云依赖项和版本。没有构建问题。
当我的客户端应用程序启动并尝试通过配置服务(外部)读取配置时记录。application.yml
配置服务与外部有文件的配置仓库对话。查看以下日志的前 3 行
从配置服务进行上述日志连接后发生的完全异常: