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

[GitHub] [dubbo-samples] chickenlj commented on a diff in pull request #756: Dubbo-samples-stub Refactor to springboot style

chickenlj commented on code in PR #756:
URL: https://github.com/apache/dubbo-samples/pull/756#discussion_r1123965904


##########
2-advanced/dubbo-samples-stub/dubbo-samples-stub-provider/src/main/java/org/apache/dubbo/samples/stub/provider/StubProvider.java:
##########
@@ -17,19 +17,20 @@
  *
  */
 
-package org.apache.dubbo.samples.stub;
+package org.apache.dubbo.samples.stub.provider;
 
-import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
 
 import java.util.concurrent.CountDownLatch;
 
+@SpringBootApplication
+@EnableDubbo
 public class StubProvider {
-
     public static void main(String[] args) throws Exception {
-        new EmbeddedZooKeeper(2181, false).start();

Review Comment:
   Keeping an embedded zookeeper would make it easier for users to use.



-- 
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