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

There is an error in the sample code for the SDK document #37

Closed
johnnywww opened this issue Aug 29, 2018 · 1 comment
Closed

There is an error in the sample code for the SDK document #37

johnnywww opened this issue Aug 29, 2018 · 1 comment
Assignees

Comments

@johnnywww
Copy link

I write demo through nacos's sdk. There is an error exist in sample code.

NamingService naming = NamingFactory.createNaming(System.getProperty("serveAddr"));
naming.subscribe("nacos.test.3", event -> {
    if (event instanceof NamingEvent) {
        System.out.println(((NamingEvent) event).getServceName());
        System.out.println(((NamingEvent) event).getInstances());
    }
});

There is no method getServceName for class NamingEvent.

@yangyshdan
Copy link
Collaborator

Please download the latest api component source code.

The class is under package com.alibaba.nacos.api.naming.listener.

realJackSun pushed a commit to realJackSun/nacos that referenced this issue Mar 31, 2021
realJackSun pushed a commit to realJackSun/nacos that referenced this issue Mar 31, 2021
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

3 participants