{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-dubbo/issues/2054","repository_url":"https://api.github.com/repos/apache/incubator-dubbo","labels_url":"https://api.github.com/repos/apache/incubator-dubbo/issues/2054/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-dubbo/issues/2054/comments","events_url":"https://api.github.com/repos/apache/incubator-dubbo/issues/2054/events","html_url":"https://github.com/apache/incubator-dubbo/issues/2054","id":339365640,"node_id":"MDU6SXNzdWUzMzkzNjU2NDA=","number":2054,"title":"anonymous inner class doesn't work in callback.","user":{"login":"L-Angel","id":8940416,"node_id":"MDQ6VXNlcjg5NDA0MTY=","avatar_url":"https://avatars2.githubusercontent.com/u/8940416?v=4","gravatar_id":"","url":"https://api.github.com/users/L-Angel","html_url":"https://github.com/L-Angel","followers_url":"https://api.github.com/users/L-Angel/followers","following_url":"https://api.github.com/users/L-Angel/following{/other_user}","gists_url":"https://api.github.com/users/L-Angel/gists{/gist_id}","starred_url":"https://api.github.com/users/L-Angel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/L-Angel/subscriptions","organizations_url":"https://api.github.com/users/L-Angel/orgs","repos_url":"https://api.github.com/users/L-Angel/repos","events_url":"https://api.github.com/users/L-Angel/events{/privacy}","received_events_url":"https://api.github.com/users/L-Angel/received_events","type":"User","site_admin":false},"labels":[{"id":699741254,"node_id":"MDU6TGFiZWw2OTk3NDEyNTQ=","url":"https://api.github.com/repos/apache/incubator-dubbo/labels/status/waiting-for-feedback","name":"status/waiting-for-feedback","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":{"login":"beiwei30","id":18651996,"node_id":"MDQ6VXNlcjE4NjUxOTk2","avatar_url":"https://avatars3.githubusercontent.com/u/18651996?v=4","gravatar_id":"","url":"https://api.github.com/users/beiwei30","html_url":"https://github.com/beiwei30","followers_url":"https://api.github.com/users/beiwei30/followers","following_url":"https://api.github.com/users/beiwei30/following{/other_user}","gists_url":"https://api.github.com/users/beiwei30/gists{/gist_id}","starred_url":"https://api.github.com/users/beiwei30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beiwei30/subscriptions","organizations_url":"https://api.github.com/users/beiwei30/orgs","repos_url":"https://api.github.com/users/beiwei30/repos","events_url":"https://api.github.com/users/beiwei30/events{/privacy}","received_events_url":"https://api.github.com/users/beiwei30/received_events","type":"User","site_admin":false},"assignees":[{"login":"beiwei30","id":18651996,"node_id":"MDQ6VXNlcjE4NjUxOTk2","avatar_url":"https://avatars3.githubusercontent.com/u/18651996?v=4","gravatar_id":"","url":"https://api.github.com/users/beiwei30","html_url":"https://github.com/beiwei30","followers_url":"https://api.github.com/users/beiwei30/followers","following_url":"https://api.github.com/users/beiwei30/following{/other_user}","gists_url":"https://api.github.com/users/beiwei30/gists{/gist_id}","starred_url":"https://api.github.com/users/beiwei30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beiwei30/subscriptions","organizations_url":"https://api.github.com/users/beiwei30/orgs","repos_url":"https://api.github.com/users/beiwei30/repos","events_url":"https://api.github.com/users/beiwei30/events{/privacy}","received_events_url":"https://api.github.com/users/beiwei30/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-07-09T09:09:41Z","updated_at":"2018-07-12T05:52:53Z","closed_at":null,"author_association":"NONE","body":"\r\n* Dubbo version: 2.5.10\r\n* Operating System version: Win 10\r\n* Java version: 1.8\r\n\r\n下面这种写法 会报没有实现Serializable接口\r\n\r\n/*cDubboDemoService.helloWorldAsyncCallback(req, new AsncCallbackListener<HelloWorldResponseType>() {\r\n     @Override\r\n     public void onComplete(HelloWorldResponseType response) {\r\n         System.out.println(\"Async Callback : \\n\");\r\n         System.out.println(response.getRetMsg());\r\n         System.out.println(\"Client DateTime : \" + new Date());\r\n     }\r\n });*/ "},"comment":{"url":"https://api.github.com/repos/apache/incubator-dubbo/issues/comments/404397527","html_url":"https://github.com/apache/incubator-dubbo/issues/2054#issuecomment-404397527","issue_url":"https://api.github.com/repos/apache/incubator-dubbo/issues/2054","id":404397527,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDM5NzUyNw==","user":{"login":"beiwei30","id":18651996,"node_id":"MDQ6VXNlcjE4NjUxOTk2","avatar_url":"https://avatars3.githubusercontent.com/u/18651996?v=4","gravatar_id":"","url":"https://api.github.com/users/beiwei30","html_url":"https://github.com/beiwei30","followers_url":"https://api.github.com/users/beiwei30/followers","following_url":"https://api.github.com/users/beiwei30/following{/other_user}","gists_url":"https://api.github.com/users/beiwei30/gists{/gist_id}","starred_url":"https://api.github.com/users/beiwei30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beiwei30/subscriptions","organizations_url":"https://api.github.com/users/beiwei30/orgs","repos_url":"https://api.github.com/users/beiwei30/repos","events_url":"https://api.github.com/users/beiwei30/events{/privacy}","received_events_url":"https://api.github.com/users/beiwei30/received_events","type":"User","site_admin":false},"created_at":"2018-07-12T05:52:53Z","updated_at":"2018-07-12T05:52:53Z","author_association":"CONTRIBUTOR","body":"@L-Angel I don't see the difference. I move all logic in `main` into another class say `CallbackClient`:\r\n\r\n```java\r\npackage com.alibaba.dubbo.samples.callback;\r\n\r\nimport com.alibaba.dubbo.samples.callback.api.CallbackListener;\r\nimport com.alibaba.dubbo.samples.callback.api.CallbackService;\r\nimport org.springframework.context.support.ClassPathXmlApplicationContext;\r\n\r\npublic class CallbackClient {\r\n    public void execute() {\r\n        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{\"spring/callback-consumer.xml\"});\r\n        context.start();\r\n        CallbackService callbackService = (CallbackService) context.getBean(\"callbackService\");\r\n        callbackService.addListener(\"foo.bar\", new CallbackListener() {\r\n            public void changed(String msg) {\r\n                System.out.println(\"callback1:\" + msg);\r\n            }\r\n        });\r\n    }\r\n}\r\n```\r\n\r\nand change `CallbackConsumer` to:\r\n\r\n```java\r\npackage com.alibaba.dubbo.samples.callback;\r\n\r\n/**\r\n * CallbackConsumer\r\n */\r\npublic class CallbackConsumer {\r\n\r\n    public static void main(String[] args) throws Exception {\r\n        new CallbackClient().execute();\r\n        System.in.read();\r\n    }\r\n\r\n}\r\n```\r\n\r\nit still works."}}
{"actor":{"display_login":"beiwei30"}}