apolloconfig / apollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
https://www.apolloconfig.com
Apache License 2.0
29.13k stars 10.2k forks source link

Feign的配置无法热更新 #2587

Closed ttamatt closed 5 years ago

ttamatt commented 5 years ago

@FeignClient(name = "apollo", url = "${apollo.url}", fallbackFactory = ApolloFallback.class)

apollo.bootstrap.enabled = true apollo.bootstrap.eagerLoad.enabled=true apollo.bootstrap.namespaces = XXX apollo.autoUpdateInjectedSpringProperties=true

用feign调用时,获取url必须要重启服务才能更新配置,请问有办法同@Value一样热更新么?

nobodyiam commented 5 years ago

可以具体看下 org.springframework.cloud.openfeign.FeignClientsRegistrar#registerFeignClients ,它的默认实现是只在启动的时候解析一次

ttamatt commented 5 years ago

好的,谢谢

mackjie commented 3 years ago

麻烦问下url动态变化这个问题最终你是怎么解决的?