Dubbox

四码库的浅见解

一、部署环境

  1、下载源码:

    网址:https://github.com/dangdangdotcom/dubbox/tree/dubbox-2.8.4

    然后解压;

  2、在源码路径下运行: mvn clean install -Dmaven.test.skip=true

    如: cmd进入D:\soft\dubbox-master 然后执行 mvn clean install -Dmaven.test.skip=true

    Dubbox

     Dubbox

  3、运行  mvn install:install-file -Dfile=E:\accp\Y2\Dubbo\dubbox-dubbox-2.8.4\dubbo\target\dubbo-2.8.4.jar -DgroupId=com.alibaba -DartifactId=dubbo -Dversion=2.8.4 -Dpackaging=jar -DgeneratePom=true

       Dubbox

     Dubbox

 

 

 二、导入依赖  

Dubbox

<dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.alibaba</groupId>
      <artifactId>dubbo</artifactId>
      <version>2.8.4</version>
    </dependency>
    <!-- 添加zk客户端依赖 -->
    <dependency>
      <groupId>com.github.sgroschupf</groupId>
      <artifactId>zkclient</artifactId>
      <version>0.1</version>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jaxrs</artifactId>
      <version>3.0.7.Final</version>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-client</artifactId>
      <version>3.0.7.Final</version>
    </dependency>
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>1.0.0.GA</version>
    </dependency>

    <!-- 如果要使用json序列化 -->
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jackson-provider</artifactId>
      <version>3.0.7.Final</version>
    </dependency>

    <!-- 如果要使用xml序列化 -->
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jaxb-provider</artifactId>
      <version>3.0.7.Final</version>
    </dependency>

    <!-- 如果要使用netty server -->
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-netty</artifactId>
      <version>3.0.7.Final</version>
    </dependency>

    <!-- 如果要使用Sun HTTP server -->
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jdk-http</artifactId>
      <version>3.0.7.Final</version>
    </dependency>

    <!-- 如果要使用tomcat server -->
    <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-core</artifactId>
      <version>8.0.11</version>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-logging-juli</artifactId>
      <version>8.0.11</version>
    </dependency>
    <dependency>
      <groupId>com.esotericsoftware.kryo</groupId>
      <artifactId>kryo</artifactId>
      <version>2.24.0</version>
    </dependency>
    <dependency>
      <groupId>de.javakaffee</groupId>
      <artifactId>kryo-serializers</artifactId>
      <version>0.26</version>
    </dependency>
    <dependency>
      <groupId>de.ruedigermoeller</groupId>
      <artifactId>fst</artifactId>
      <version>1.55</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>2.3.3</version>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
      <version>7.0.0.pre5</version>
    </dependency>
    <dependency>
      <groupId>com.dubbo</groupId>
      <artifactId>dubbox_service</artifactId>
      <version>1.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>

View Code

 三、dubbox_service (公用service)

  3.1 目录展示

      Dubbox

 

 

  3.2 DoSomeService

     Dubbox

 

 

 四、dubbox_provider (生产者)

  4.1 目录展示

     Dubbox

 

 

   4.2 DoSomeServiceImpl

     Dubbox

 

 

   4.3 配置文件 applicationContext-provider.xml

    Dubbox

 

 

   4.4 AppTest测试类

    Dubbox

 

 

 五、dubbox_consumer (消费者)

  5.1 目录展示

    Dubbox

数据结构-二叉树

  5.2 DoSomeService

    Dubbox

  5.3 配置文件 applicationContext-consumer.xml

    Dubbox

  5.4 AppTest 测试类

    Dubbox

 

 

 六、运行

  6.1 运行 dubbox_provider 的AppTest

    Dubbox

 

 

   6.2 运行 dubbox_consumer 的AppTest

    Dubbox

 

 

   6.3 运行页面

    Dubbox

 

 

     Dubbox

 

 

 

  

 

 

 

 

 

 

 

 

Vue组件应用

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享