-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apollo动态配置不生效 #162
Comments
请参考 Apollo 动态配置示例模块,我测试是没问题的。 |
我是按照事例配置的,但是apollo非properties,namespaces需要加上后缀,如thread-pool.yml,这样ApolloRefresherHandler中Config config = ConfigService.getConfig(namespace)才会有内容;但是这样配置又导致configChangeListener中ConfigService.getConfigFile最后拼接的路径为thread-pool.yml.yml导致监听apollo变动获取不到内容。我改成properties方式就正常了 |
apollo: 改成这样试试呢 |
这样不行,这样ApolloRefresherHandler中Config config = ConfigService.getConfig(namespace)获取不到配置,导致监听注册不上去。 |
稍后我试下 |
@richardcode991 我对 apollo 不太熟悉,场景复现不出来。你有兴趣针对上述问题对 ApolloRefresherHandler 提个 PR 么 |
好的 后面我处理下 |
今天会为 Core 发布一个新的 RC 版本。 <dependency>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-core-spring-boot-starter</artifactId>
<version>1.2.0-RC1</version>
</dependency> |
使用版本1.2.0
getConfig和getConfigFile入参应该和上图一致。
getConfigFile 应该不带后缀吧。
配置:
apollo:
namespace: thread-pool.yml
config-file-type: yml # 配置中心文件格式
The text was updated successfully, but these errors were encountered: