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

getConfig需要提供tenant入参支持 #32

Closed
raphaelsoul opened this issue Apr 21, 2020 · 1 comment
Closed

getConfig需要提供tenant入参支持 #32

raphaelsoul opened this issue Apr 21, 2020 · 1 comment

Comments

@raphaelsoul
Copy link

raphaelsoul commented Apr 21, 2020

getConfig方法无法获取非public空间下的配置

正确的获取请求

curl http://some.nacos.instance/nacos/v1/cs/configs?dataId=TEST_CONFIG_ITEM&group=LOCAL&tenant=1243f842-fa03-4ef8-b226-5ba55a79052c

文档
追踪了一下源码没有地方提供这个参数的支持

@raphaelsoul
Copy link
Author

const configClient = new NacosConfigClient({
    serverAddr: "some.nacos.instance",
    namespace: "f431e1bb-36f3-4cdb-aa6b-04f8a6347dce",
    // namespace: "someNamespace"
});

做了一些测试以后发现 namespace配置为命名空间的名字时获取不到配置
留空则使用默认命名空间public
配置为命名空间ID后按期望获取到了相应的配置

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant