ConfigurationPropertiesRebinder doesn't rebind properties for a bean which was created during bootstrap phase
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- java, spring-boot
- 领域
- backend
调研方向
从 spring-cloud-context/src/main/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinder.java 和复现测试 SpringCloudContextBugApplicationTests.shouldNotFailToUpdateApplicationPropertiesBean 开始。比较 spring-cloud-commons 3.1.4 和 3.1.5 之间的 rebind 行为,然后运行所引用的测试。完成的标准是 bootstrap 创建的 @ConfigurationProperties bean 能够接收到获取的 Spring Cloud 值,同时不破坏现有的 rebinding 行为。
由索引模型根据 Issue 内容生成。
描述
Bug description
Version of spring-cloud-commons: 3.1.5 (in lower versions of spring-cloud-commons this bug doesn't occur)
Version of spring-boot: 2.7.9 (irrelevant)
When a bean using @ConfigurationProperties is created during bootstrap phase with values taken from bootstrap.yaml file, then the values of this bean's fields are not updated with properties fetched using spring-cloud.
Sample
I've created a repository which reproduces this bug: https://github.com/pitagoras3/spring-cloud-context-bug.
In this project, you can find a test SpringCloudContextBugApplicationTests.shouldNotFailToUpdateApplicationPropertiesBean which fails, when springCloudCommons version is >= 3.1.5.
Where is the problem?
After some debugging I've found out that rebind method in ConfigurationPropertiesRebinder had changed between versions 3.1.4 and 3.1.5. In my opinion the bug which I have described might be a side-effect of this specific change. In 3.1.5 version of spring-cloud-context my IncorrectProperties bean used in test is never destroyed and initialized again (as it was in version 3.1.4).
- 主要语言
- Java
- 星标
- 751
- 派生
- 767
- 平均合并
- 1 天 1 小时
- 30 天内合并 PR
- 17
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
spring-cloud/spring-cloud-commons 的其他 Issue
-
waiting-for-triage
难度 2/5 1-3 小时 新手友好度 72/100
spring-cloud/spring-cloud-commons#1708 ·
维护者通常 1 天内回复
-
waiting-for-triage
难度 1/5 1 小时以内 新手友好度 65/100
spring-cloud/spring-cloud-commons#1543 ·
维护者通常 1 天内回复
-
enhancement for team discussion
难度 5/5 一周以上 新手友好度 42/100
spring-cloud/spring-cloud-commons#1676 ·
维护者通常 1 天内回复
-
waiting-for-triage
难度 5/5 一周以上 新手友好度 38/100
spring-cloud/spring-cloud-commons#1675 · 1 条评论 ·
维护者通常 1 天内回复
-
waiting-for-triage
难度 4/5 3-5 天 新手友好度 42/100
spring-cloud/spring-cloud-commons#1640 ·
维护者通常 1 天内回复
查看 spring-cloud/spring-cloud-commons 的全部 Issue
相似的 Issue
-
pdfium-drift
难度 1/5 1 小时以内 新手友好度 84/100
Stirling-Tools/JPDFium#240 ·
维护者通常 1 天内回复
-
Bug
难度 2/5 1-3 小时 新手友好度 60/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 68/100
Vakore/ZappierGames#285 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
objectionary/jeo-maven-plugin#2008 ·
维护者通常 1 天内回复