You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there, @skillblue001! 👋 I'm here to help with any bugs, questions, or contributions you have in mind. I'm a bot designed to assist you while waiting for a human maintainer. Let's tackle this issue together!
I found a similar closed issue regarding the problem where Spring Boot listens to the configuration update action, but the new value is not updated [1]. However, no solution was found in the comments of that issue.
Regarding your issue with @ConfigurationProperties and @RefreshScope, it seems that the refresh mechanism is functioning but not capturing new properties added post-startup. This behavior might be due to how @ConfigurationProperties handles map structures. Unfortunately, I couldn't find specific documentation or known issues related to this in the Apollo repository.
One potential workaround is to ensure that the /actuator/refresh endpoint is used to trigger a refresh, as you mentioned it works correctly in your case. This endpoint forces a refresh of the application context, which might be necessary for new key-value pairs to be recognized.
If you haven't already, you might want to explore the possibility of using a custom refresh mechanism or checking if there are any updates or patches in newer versions of Apollo or related libraries that address this issue.
描述bug
基于RefreshScope 刷新,@ConfigurationProperties配置的类,通过@EnableConfigurationProperties,创建的无效,按demo(https://github.com/apolloconfig/apollo-demo-java/blob/main/spring-boot-demo/src/main/java/com/apolloconfig/apollo/demo/springboot/refresh/SpringBootApolloRefreshConfig.java)中使用,删除、修改类中配置的map已有的key有效,但是添加新的配置无效(在调用RefreshScope.refresh方法之前通过ConfigurableEnvironment确认配置的已经添加到上下文中了),通过/actuator/refresh刷新正常有效,
复现
通过如下步骤可以复现:
额外的细节和日志
版本: <apollo.version>2.3.0</apollo.version>, <boot.version>2.3.12.RELEASE</boot.version>, <spring-cloud.version>Hoxton.SR12</spring-cloud.version>
错误日志
配置:
平台和操作系统
The text was updated successfully, but these errors were encountered: