dubbo-admin 環境搭建注意點

  • github 源碼: https://github.com/alibaba/dubbo.gitgit

  • 下載到Eclipse 後,從新用Maven工程載入。github

  • 修改pom文件:
    web

一、webx的依賴改成3.1.6版;spring

    <dependency>
        <groupId>com.alibaba.citrus</groupId>
        <artifactId>citrus-webx-all</artifactId>
        <version>3.1.6</version>
    </dependency>

二、添加velocity的依賴,我用了1.7;apache

    <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity</artifactId>
        <version>1.7</version>
    </dependency>

三、對依賴項dubbo添加exclusion,避免引入舊springtomcat

    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>dubbo</artifactId>
        <version>${project.parent.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

四、webx已有spring 3以上的依賴,所以註釋掉dubbo-admin裏面的spring依賴spa

    <!--<dependency>-->
        <!--<groupId>org.springframework</groupId>-->
        <!--<artifactId>spring</artifactId>-->
    <!--</dependency>-->

肯定war包解壓後lib目錄沒有spring 3 如下的依賴就行。code

  • 下載zookeeper :http://apache.fayea.com/zookeeper/stable/zookeeper-3.4.6.tar.gzorm

    修改 conf下的zoo_sample.cfg 爲zoon.cfg並修改裏面的數據存儲位置。ip

  • 用tomcat發佈dubbo-admin 並修改 WEB-INF下的dubbo.properties 

    dubbo.registry.address=zookeeper://127.0.0.1:2181 地址和端口修改成對應的zookeeper

    訪問dubbo-admin:

相關文章
相關標籤/搜索