Closed ttamatt closed 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一样热更新么?
可以具体看下 org.springframework.cloud.openfeign.FeignClientsRegistrar#registerFeignClients ,它的默认实现是只在启动的时候解析一次
好的,谢谢
麻烦问下url动态变化这个问题最终你是怎么解决的?
@FeignClient(name = "apollo", url = "${apollo.url}", fallbackFactory = ApolloFallback.class)
用feign调用时,获取url必须要重启服务才能更新配置,请问有办法同@Value一样热更新么?