ZookeeperRegistry类重写问题
因业务需求,需要对ZookeeperRegistry类进行重写,怎么样在不污染dubbo源码的方式对它重写,并且不修改/dubbo-registry-zookeeper/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.registry.RegistryFactory中的zookeeper指向地址
Please refer to : http://dubbo.apache.org/zh-cn/docs/dev/impls/registry.html and http://dubbo.apache.org/zh-cn/blog/introduction-to-dubbo-spi.html
和Java SPI从/META-INF/services目录加载扩展配置类似,Dubbo也会从以下路径去加载扩展配置文件:
(translation: Similar to the Java SPI loading extension configuration from the /META-INF/services directory, Dubbo also loads the extension configuration file from the following path: )
- META-INF/dubbo/internal
- META-INF/dubbo
- META-INF/services
You can write a services extension to rewrite the orginal zookeeper configuration. I am not sure whether the answer meet your need. If not, please let me know.
liutianv1 [email protected] 于2018年11月6日周二 下午3:50写道:
因业务需求,需要对ZookeeperRegistry类进行重写,怎么样在不污染dubbo源码的方式对它重写,并且不修改/dubbo-registry-zookeeper/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.registry.RegistryFactory中的zookeeper指向地址
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apache/incubator-dubbo/issues/2743, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5mbJWfCIq5r9gscduLwPbpOUAosQVwks5usT9TgaJpZM4YP6j0 .
--
Best Regard! cvitory
非常感谢,完美扩展了。哈哈哈
dubbo的spi就是干这个的