spring.cloud.refresh.never-refreshable not ignoring class
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #1467 来自 @quaff —— 已关闭,未合并
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java, spring, spring-boot
- 领域
- backend
调研方向
从 org.springframework.cloud.context.properties.ConfigurationPropertiesRebinder#getNeverRefreshable 开始,将 spring.cloud.refresh.never-refreshable 设置为 com.sth.IgnoreMe,以复现该行为。当已配置的类即使其运行时名称包含 Spring 生成的 EnhancerBySpringCGLIB 后缀仍保持被忽略时,问题即得到解决。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Hi folks,
I have a class name set in spring.cloud.refresh.never-refreshable to be ignored for refresh.
This however doesn't work because Spring adds some EnhancerBySpringCGLIB to the class name.
Thus, this snippet org.springframework.cloud.context.properties.ConfigurationPropertiesRebinder#getNeverRefreshable fails when calling getClass().getName()
Sample
1.) set prop: spring.cloud.refresh.never-refreshable=com.sth.IgnoreMe
2.) bean.getClass().getName() - returns during runtime a modified com.sth.IgnoreMe$$EnhancerBySpringCGLIB$$aaffeeaa and the comparison against the prop value of com.sth.IgnoreMe fails.
- 主要语言
- Java
- 星标
- 751
- 派生
- 767
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 15
环境准备
- 没有 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
-
难度 2/5 1-3 小时 新手友好度 75/100
vert-x3/vertx-mail-client#268 ·
-
desktop edt not responding
难度 1/5 1-3 小时 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
physical
难度 2/5 1-3 小时 新手友好度 74/100
antonyrag/ragleap-core#1339 ·
-
难度 2/5 1-3 小时 新手友好度 83/100
apache/doris-kafka-connector#110 ·