Skip to content
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

2.0.1版本AddressServerMemberLookup.syncFromAddressUrl方法与nacos endpoint不兼容 #5999

Closed
MI-cool opened this issue Jun 8, 2021 · 2 comments · Fixed by #6001
Closed

Comments

@MI-cool
Copy link
Contributor

MI-cool commented Jun 8, 2021

Is your feature request related to a problem? Please describe.
AddressServerMemberLookup.syncFromAddressUrl方法需要后端服务返回json格式数据,而nacos endpoint返回的是简单字符串。这样导致同类功能接口需要重复建设

Describe the solution you'd like
修改genericType定义为GenericType<String>

@KomachiSion
Copy link
Collaborator

这个方法从1.3发布开始就一直是这个类型,能麻烦提供更多相关信息吗

@MI-cool
Copy link
Contributor Author

MI-cool commented Jun 8, 2021

nacos server通过address-url获取server节点列表和nacos client通过endpoint获取server节点列表在使用场景上是类似的,这是前提。
以下的server端处理过程需要address-url返回json格式数据

private void syncFromAddressUrl() throws Exception {

而client端处理过程需要nacos endpoint返回内容为换行分隔的nacos server ip:port列表字符串
private List<String> getApacheServerList(String url, String name) {

应用场景类似却需要不同接口定义,感觉没什么必要

KomachiSion pushed a commit that referenced this issue Jun 15, 2021
…point (#6001)

* [ISSUE #5999] AddressServerMemberLookup.syncFromAddressUrl适配nacos endpoint

* 添加AddressServerMemberLookup.syncFromAddressUrl方法测试

* 恢复点分隔配置
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants