You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Tomoko-hjf (via GitHub)" <gi...@apache.org> on 2023/03/01 03:03:05 UTC

[GitHub] [dubbo-samples] Tomoko-hjf opened a new pull request, #753: refactor dubbo-samples-notify

Tomoko-hjf opened a new pull request, #753:
URL: https://github.com/apache/dubbo-samples/pull/753

   refactor dubbo-samples-notify


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] chickenlj commented on a diff in pull request #753: refactor dubbo-samples-notify

Posted by "chickenlj (via GitHub)" <gi...@apache.org>.
chickenlj commented on code in PR #753:
URL: https://github.com/apache/dubbo-samples/pull/753#discussion_r1122975815


##########
2-advanced/dubbo-samples-notify/dubbo-samples-notify-consumer/src/main/resources/application.yml:
##########
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#dubbo:
+#  application:
+#    name: dubbo-samples-notify-consumer
+#  protocol:
+#    name: dubbo
+#    port: -1
+#  registry:
+#    address: zookeeper://${zookeeper.address:127.0.0.1}:2181
+#dubbo:
+#  reference:
+#    org.apache.dubbo.samples.notify.DemoService.sayHello.onreturn: notify.onReturn

Review Comment:
   Has this way of configuration proven not to work well?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] Tomoko-hjf commented on a diff in pull request #753: refactor dubbo-samples-notify

Posted by "Tomoko-hjf (via GitHub)" <gi...@apache.org>.
Tomoko-hjf commented on code in PR #753:
URL: https://github.com/apache/dubbo-samples/pull/753#discussion_r1123089284


##########
2-advanced/dubbo-samples-notify/dubbo-samples-notify-consumer/src/main/resources/application.yml:
##########
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#dubbo:
+#  application:
+#    name: dubbo-samples-notify-consumer
+#  protocol:
+#    name: dubbo
+#    port: -1
+#  registry:
+#    address: zookeeper://${zookeeper.address:127.0.0.1}:2181
+#dubbo:
+#  reference:
+#    org.apache.dubbo.samples.notify.DemoService.sayHello.onreturn: notify.onReturn

Review Comment:
   Yes, this doesn't work, I've added README.md and EmbeddedZooKeeper.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] Tomoko-hjf commented on pull request #753: refactor dubbo-samples-notify

Posted by "Tomoko-hjf (via GitHub)" <gi...@apache.org>.
Tomoko-hjf commented on PR #753:
URL: https://github.com/apache/dubbo-samples/pull/753#issuecomment-1451607802

   您好,我使用三种方式验证了`dubbo`的`notify`功能,但是只有第一种`纯注解`方式成功了,想确认一下是不是哪里做错了,导致第二种方式`注解+properties`方式失败了,下面是详细过程:
   
   【方式一】:使用纯注解,这种方式是成功的
   ![image](https://user-images.githubusercontent.com/53164956/222394860-3523d6c7-7c2e-4392-96a7-41e22faa3646.png)
   
   【方式二】:尝试使用注解+properties方式,这种方式是失败的,不会执行回调方法。首先我只使用了@DubboReference注解,然后在dubbo.properties中配置了返回后的方法,具体如下:
   ![image](https://user-images.githubusercontent.com/53164956/222395034-b5bbe488-602f-482d-8edc-5b3475d79ced.png)
   ![image](https://user-images.githubusercontent.com/53164956/222395266-ddcb2037-fd97-494c-9f5c-033a8231b503.png)
   
   【方式三】:尝试在application.yml文件中配置,也是失败的
   ![image](https://user-images.githubusercontent.com/53164956/222395773-314cd94f-f3a9-4337-816e-66f366203aac.png)
   
   可以帮忙看一下第二种方式吗,谢谢~
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] chickenlj merged pull request #753: refactor dubbo-samples-notify

Posted by "chickenlj (via GitHub)" <gi...@apache.org>.
chickenlj merged PR #753:
URL: https://github.com/apache/dubbo-samples/pull/753


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] chickenlj commented on a diff in pull request #753: refactor dubbo-samples-notify

Posted by "chickenlj (via GitHub)" <gi...@apache.org>.
chickenlj commented on code in PR #753:
URL: https://github.com/apache/dubbo-samples/pull/753#discussion_r1122973223


##########
2-advanced/dubbo-samples-notify/dubbo-samples-notify-provider/src/main/java/org/apache/dubbo/samples/notify/provider/ProviderApplication.java:
##########
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dubbo.samples.notify.provider;
+
+import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+@EnableDubbo
+public class ProviderApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(ProviderApplication.class, args);

Review Comment:
   ` new EmbeddedZooKeeper(2181, false).start();`
   
   We can put an embedded zookeeper here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org