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

NacosDataSource 对象缺少 Nacos 的 namespace 参数 #272

Closed
gumutianqi opened this issue Nov 29, 2018 · 2 comments · Fixed by #348
Closed

NacosDataSource 对象缺少 Nacos 的 namespace 参数 #272

gumutianqi opened this issue Nov 29, 2018 · 2 comments · Fixed by #348
Labels
good first issue Good for newcomers kind/enhancement Category issues or prs related to enhancement.

Comments

@gumutianqi
Copy link

gumutianqi commented Nov 29, 2018

基于 Nacos 实现 ReadableDataSource 的扩展时,发现 NacosDataSource 对象缺少 Nacos 的 namespace 参数;

ReadableDataSource<String, List<FlowRule>> flowRuleDataSource =
   new NacosDataSource<>(remoteAddress, groupId, dataId,
        source -> JSON.parseObject(source, new TypeReference<List<FlowRule>>() {}));
@sczyh30 sczyh30 added the kind/enhancement Category issues or prs related to enhancement. label Nov 29, 2018
@sczyh30
Copy link
Member

sczyh30 commented Nov 29, 2018

Hi, thanks for reporting. Would you like to contribute a PR to resolve it?

@sczyh30 sczyh30 added the good first issue Good for newcomers label Nov 30, 2018
@cdfive
Copy link
Collaborator

cdfive commented Dec 12, 2018

@gumutianqi
There is another overload method to get a ConfigService in nacos:

NacosFactory.createConfigService(Properties properties)

The namespace value can be added into properties:

properties.put(PropertyKeyConst.NAMESPACE, "xxx");

fangjian0423 added a commit to fangjian0423/Sentinel that referenced this issue Dec 27, 2018
…structor for NacosDataSource to support namespace, endpoint, ak, sk and so on
fangjian0423 added a commit to fangjian0423/Sentinel that referenced this issue Dec 27, 2018
…structor for NacosDataSource to support namespace, endpoint, ak, sk and so on
sczyh30 pushed a commit that referenced this issue Dec 27, 2018
…ies (#348)

* Polish #272: upgrade nacos-client version and create a new constructor for NacosDataSource to support namespace, endpoint, ak, sk and so on
* check properties in NacosDataSource
Arlmls pushed a commit to Arlmls/Sentinel that referenced this issue Jan 8, 2019
…ies (alibaba#348)

* Polish alibaba#272: upgrade nacos-client version and create a new constructor for NacosDataSource to support namespace, endpoint, ak, sk and so on
* check properties in NacosDataSource
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants