Dubbo+Zookeeper+Springmvc整合

下面先来介绍安装zookeeper: 
解压zookeeper-3.4.6.tar.gz到指定目录,进入zookeeper-3.4.6\conf目录并复制zoo_sample.cfg文件更名为zoo.cfg,由于zookeeper启动时默认找zoo.cfg这个文件,修改zoo.cfg文件内容以下: javascript

Java代码 css

核心技术:Maven,Springmvc mybatis shiro, Druid, Restful, Dubbo, ZooKeeper,Redis,FastDFS,ActiveMQ,Nginx html

  1. # The number of milliseconds of each tick  
  2. tickTime=2000  
  3. # The number of ticks that the initial   
  4. # synchronization phase can take  
  5. initLimit=10  
  6. # The number of ticks that can pass between   
  7. # sending a request and getting an acknowledgement  
  8. syncLimit=5  
  9. # the directory where the snapshot is stored.  
  10. # do not use /tmp for storage, /tmp here is just   
  11. # example sakes.  
  12. dataDir=D:\zookeeper-3.4.6\zookeeperinstall\data  
  13. # the port at which the clients will connect  
  14. clientPort=2181  
  15. # the maximum number of client connections.  
  16. # increase this if you need to handle more clients  
  17. #maxClientCnxns=60  
  18. #  
  19. # Be sure to read the maintenance section of the   
  20. # administrator guide before turning on autopurge.  
  21. #  
  22. # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance  
  23. #  
  24. # The number of snapshots to retain in dataDir  
  25. #autopurge.snapRetainCount=3  
  26. # Purge task interval in hours  
  27. # Set to "0" to disable auto purge feature  
  28. #autopurge.purgeInterval=1  


到此zookeeper安装完毕,进入zookeeper-3.4.6\bin目录,执行zkServer.cmd或者zkServer.sh脚本就能够启动zookeeper了,例如在Windows下进入cmd命令行,D:\zookeeper-3.4.6\bin>zkServer.cmd  这里直接回车便可。 


安装dubbo-admin-2.5.4.war管理控制台: 
把apache-tomcat-6.0.43/webapps/ROOT目录中的全部内容所有删除掉,把dubbo-admin-2.5.4.war文件解压并把所有内容拷贝到apache-tomcat-6.0.43/webapps/ROOT目录下,以下图 

修改WEB-INF目录下的dubbo.properties文件: 
dubbo.registry.address=zookeeper://127.0.0.1:2181 
dubbo.admin.root.password=root 
dubbo.admin.guest.password=guest 
启动tomcat 
访问http://127.0.0.1:8080/governance/applications/ 
登陆的用户名和密码都是root,不是root/guest 

到此为止dubbo-admin-2.5.4.war管理控制台安装完毕。 


下面编写服务提供者代码: 
 
applicationCustomer.xml文件代码以下: java

Java代码 web

 收藏代码

  1. <?xml version="1.0" encoding="UTF-8"?>    
  2. <beans xmlns="http://www.springframework.org/schema/beans"    
  3.   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"    
  4.   xsi:schemaLocation="http://www.springframework.org/schema/beans    
  5.     http://www.springframework.org/schema/beans/spring-beans.xsd    
  6.     http://code.alibabatech.com/schema/dubbo    
  7.     http://code.alibabatech.com/schema/dubbo/dubbo.xsd ">   
  8.   <!-- 具体的实现bean -->    
  9.   <bean id="demoService" class="com.shihuan.zooshare.service.impl.CustomerServiceImpl" />    
  10.   <!-- 提供方应用信息,用于计算依赖关系 -->    
  11.   <dubbo:application name="shihuan_customer"  />    
  12.   <!-- 使用multicast广播注册中心暴露服务地址     
  13.   <dubbo:registry address="multicast://localhost:1234" />-->     
  14.   <!-- 使用zookeeper注册中心暴露服务地址 -->    
  15.   <dubbo:registry address="zookeeper://127.0.0.1:2181" />    
  16.   <!-- 用dubbo协议在20880端口暴露服务 -->    
  17.   <dubbo:protocol name="dubbo" port="20880" />    
  18.   <!-- 声明须要暴露的服务接口 -->    
  19.   <dubbo:service interface="com.shihuan.zooshare.service.CustomerService" ref="demoService" />  
  20. </beans>  


CustomerService.java文件代码以下: spring

Java代码 sql

 收藏代码

  1. package com.shihuan.zooshare.service;  
  2.   
  3. public interface CustomerService {  
  4.     public String getName();  
  5. }  


CustomerServiceImpl.java代码以下: express

Java代码 apache

 收藏代码

  1. package com.shihuan.zooshare.service.impl;  
  2.   
  3. import com.shihuan.zooshare.service.CustomerService;  
  4.   
  5. public class CustomerServiceImpl implements CustomerService {  
  6.   
  7.     @Override  
  8.     public String getName() {  
  9.         System.out.print("shihuan print !!!");  
  10.         return "print result !!!";  
  11.     }  
  12.   
  13. }  


DubooCustomer.java文件代码以下: json

Java代码 

 收藏代码

  1. package com.shihuan.zooshare.main;  
  2.   
  3. import java.io.IOException;  
  4.   
  5. import org.springframework.beans.BeansException;  
  6. import org.springframework.context.support.ClassPathXmlApplicationContext;  
  7.   
  8. public class DubooCustomer {  
  9.   
  10.     public static void main(String[] args) {  
  11.         try {  
  12.             ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"applicationCustomer.xml"});  
  13.             context.start();    
  14.             System.out.println("Press any key to exit.");  
  15.               
  16.             System.in.read();  
  17.         } catch (BeansException e) {  
  18.             System.err.println(e.getMessage());  
  19.             e.printStackTrace();  
  20.         } catch (IOException e) {  
  21.             System.err.println(e.getMessage());  
  22.             e.printStackTrace();  
  23.         }  
  24.     }  
  25.   
  26. }  


build.xml文件内容以下: 

Java代码 

 收藏代码

  1. <?xml version="1.0" encoding="UTF-8" ?>  
  2. <project name="zooshare" default="genericjar" basedir=".">  
  3. <property name="src" value="${basedir}/src"/>  
  4. <property name="classes" value="${basedir}/bin"/>  
  5. <property name="dest" value="${basedir}/dist"/>  
  6. <property name="zooshare" value="zooshare.jar"/>  
  7. <property name="mainclass" value="com.shihuan.zooshare.main.DubooCustomer" />  
  8.       
  9.     <path id="lib-classpath">    
  10.             <fileset dir="${basedir}/lib">    
  11.                 <include name="**/*.jar"/>       
  12.                 <exclude name="**/*.bak"/>    
  13.             </fileset>    
  14.         </path>  
  15.       
  16.     <target name="clean">    
  17.             <delete dir="${basedir}/bin" />    
  18.             <delete dir="${basedir}/dist" />    
  19.         </target>  
  20.       
  21. <target name="init">  
  22.    <mkdir dir="${dest}"/>  
  23. </target>  
  24. <target name="compile" depends="init">  
  25.    <javac encoding="utf-8" srcdir="${src}" destdir="${dest}" includeantruntime="false" source="1.6" debug="yes" verbose="yes" failonerror="true" optimize="false">  
  26.         <compilerarg line="-encoding UTF-8"/>       
  27.         <classpath refid="lib-classpath" />  
  28.    </javac>  
  29.     <copy todir="${classes}">        
  30.                 <fileset dir="${src}">        
  31.                     <include name="**/*.properties"/>    
  32.                     <include name="**/*.xml"/>    
  33.                     <exclude name="**/*.bak"/>      
  34.                 </fileset>        
  35.             </copy>  
  36. </target>   
  37.       
  38.     <target name="antjar" depends="compile">    
  39.             <!--Create a property containing all .jar files,      
  40.             prefix lib/, and seperated with a space-->      
  41.             <pathconvert property="mf.classpath" pathsep=" ">      
  42.                 <mapper>      
  43.                     <chainedmapper>      
  44.                         <!-- jar包文件只留文件名,去掉目录信息 -->      
  45.                         <flattenmapper/>      
  46.                         <!-- add lib/ prefix -->      
  47.                         <globmapper from="*" to="lib/*"/>      
  48.                     </chainedmapper>      
  49.                 </mapper>     
  50.                 <path refid="lib-classpath"/>    
  51.             </pathconvert>    
  52.             <jar destfile="${dest}/zooshare.jar" basedir="${classes}">      
  53.                 <manifest>      
  54.                     <attribute name="Main-class" value="${mainclass}"/>      
  55.                     <attribute name="Class-Path" value="${mf.classpath}"/>      
  56.                 </manifest>      
  57.             </jar>    
  58.           
  59.         </target>   
  60.       
  61.     <target name="genericjar" depends="antjar"></target>  
  62. </project>  



zooshare.jar服务的结构以下图所示: 


startZooshare.bat文件内容以下: 

Java代码 

 收藏代码

  1. @echo off  
  2. set CURR_DIR=D:\AppDynamics\dubbo+zookeeper\zooshare  
  3. cd /D %CURR_DIR%  
  4.   
  5. set JAVA_HOME=D:\Java\jdk1.6.0_45  
  6.   
  7. set PATH=%JAVA_HOME%\bin;%PATH%  
  8.   
  9. rem 设置变量为延迟加载  
  10. setlocal=EnableDelayedExpansion  
  11. set CLASSPATH=.;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib  
  12. for %%j in (lib\*.jar) DO (  
  13.     echo %%j  
  14.     set CLASSPATH=!CLASSPATH!;%CURR_DIR%\%%j  
  15.     echo %CLASSPATH%  
  16. )  
  17. echo "#############################################"  
  18. echo %CLASSPATH%  
  19. echo "#############################################"  
  20.   
  21. rem set JVM_ARGS="-Xms:512m -XX:MinPermSize=128m"  
  22. rem echo JVM_ARGS=$JVM_ARGS  
  23.   
  24. @echo on  
  25. java -cp %CLASSPATH%;zooshare.jar com.shihuan.zooshare.main.DubooCustomer  


startZooshare.sh文件内容以下: 

Java代码 

 收藏代码

  1. #!/bin/sh  
  2.   
  3. export CURR_DIR=/home/zoodubbo/  
  4. cd $CURR_DIR  
  5. export JAVA_HOME=/usr/java/jdk1.6.0_45  
  6. #echo JAVA_HOME=$JAVA_HOME  
  7.   
  8. export PATH=$JAVA_HOME/bin:$PATH  
  9. #echo PATH=$PATH  
  10.   
  11. java -version  
  12.   
  13. export CLASSPATH=$CURR_DIR/lib:$CURR_DIR:$JAVA_HOME/lib:$JAVA_HOME/jre/lib  
  14.   
  15. for jarfile in `ls $CURR_DIR/lib/*.jar`  
  16. do  
  17.  export CLASSPATH=$CLASSPATH:$jarfile  
  18. done  
  19.   
  20. #echo CLASSPATH=$CLASSPATH  
  21. JVM_ARGS="-Xms:512m -XX:MinPermSize=128m"  
  22. echo JVM_ARGS=$JVM_ARGS  
  23. ulimit -n 400000  
  24. echo "" > nohup.out  
  25. #java org.jboss.netty.bootstrap.Bootstrap  
  26. nohup $JAVA_HOME/bin/java -cp $CLASSPATH:zoodubbo-0.0.1.jar com.shihuan.zoodubbo.C3p0TestMysql &  



在Windows环境中运行cmd窗口执行startZooshare.bat就能够启动zooshare服务了。 


下面来介绍服务消费者代码: 
dubooweb工程所须要的jar文件截图(这里要把zooshare.jar加进来) 
 
 
dubooweb工程整体结构图 
 
jdbc-context.xml文件代码以下: 

Java代码 

 收藏代码

  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <beans xmlns="http://www.springframework.org/schema/beans"    
  3.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     
  4.     xmlns:context="http://www.springframework.org/schema/context"    
  5.     xsi:schemaLocation="     
  6.           http://www.springframework.org/schema/beans     
  7.           http://www.springframework.org/schema/beans/spring-beans-3.1.xsd    
  8.           http://www.springframework.org/schema/context     
  9.           http://www.springframework.org/schema/context/spring-context-3.1.xsd" default-autowire="byName">  
  10.   
  11.      <context:property-placeholder location="classpath:*.properties"/>  
  12.        
  13.      <!-- 自动扫描组件,须要把controller去掉,不然影响事务管理 -->  
  14.      <context:component-scan base-package="com.shihuan.web">  
  15.         <context:exclude-filter type="regex" expression="com.shihuan.web.*"/>  
  16.      </context:component-scan>  
  17.        
  18. </beans>  


springmvc-servlet.xml文件代码以下: 

Java代码 

 收藏代码

  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <beans xmlns="http://www.springframework.org/schema/beans"    
  3.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"    
  4.     xmlns:context="http://www.springframework.org/schema/context"    
  5.     xmlns:mvc="http://www.springframework.org/schema/mvc"    
  6.     xmlns:util="http://www.springframework.org/schema/util"  
  7.     xsi:schemaLocation="     
  8.            http://www.springframework.org/schema/beans     
  9.            http://www.springframework.org/schema/beans/spring-beans-3.1.xsd     
  10.            http://www.springframework.org/schema/context     
  11.            http://www.springframework.org/schema/context/spring-context-3.1.xsd    
  12.            http://www.springframework.org/schema/mvc     
  13.            http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd  
  14.            http://www.springframework.org/schema/util   
  15.            http://www.springframework.org/schema/util/spring-util-3.1.xsd">  
  16.       
  17.     <bean id="mappingJacksonHttpMessageConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter">  
  18.         <property name="supportedMediaTypes">  
  19.             <list>  
  20.                 <value>text/html;charset=UTF-8</value>  
  21.             </list>  
  22.         </property>  
  23.     </bean>  
  24.   
  25.     <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">  
  26.         <property name="messageConverters">  
  27.             <util:list id="beanList">  
  28.                 <ref bean="mappingJacksonHttpMessageConverter" />  
  29.             </util:list>  
  30.         </property>  
  31.     </bean>  
  32.              
  33.       
  34.     <!-- 启动扫描全部的controller -->  
  35.     <context:component-scan base-package="com.shihuan.web"/>  
  36.       
  37.     <!--  主要做用于@Controller ,激活该模式  
  38.           
  39.         下面是一种简写形式,彻底能够手动配置替代这种简写形式;  
  40.          它会自动注册DefaultAnnotationHandlerMapping与AnnotationMethodHandlerAdapter 两个bean,  
  41.            是spring MVC为@Controllers分发请求所必须的  
  42.      -->  
  43.     <mvc:annotation-driven/>  
  44.         
  45.     <!-- 这里拦截器还有一种配置方法【针对路径进行配置】 推荐使用这个,方便直观-->  
  46.     <mvc:interceptors>  
  47.         <mvc:interceptor>  
  48.             <mvc:mapping path="/*"/>  
  49.             <bean class="com.shihuan.web.interceptor.DubboWebInterceptor"></bean>  
  50.         </mvc:interceptor>  
  51.     </mvc:interceptors>  
  52.       
  53.      <!-- 全局配置   
  54.     <mvc:interceptors>  
  55.         <bean class="com.olm.website.server.web.interceptor.MyInterceptor"></bean>  
  56.     </mvc:interceptors>  
  57.     -->  
  58.     <!-- 配置js,css等静态文件直接映射到对应的文件夹,不被DispatcherServlet处理 -->  
  59.     <mvc:resources location="/resources/**" mapping="/resources"/>  
  60.       
  61.     <!-- jsp页面解析器,当Controller返回XXX字符串时,先经过拦截器,而后该类就会在/WEB-INF/views/目录下,查找XXX.jsp文件-->  
  62.     <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">  
  63.             <property name="prefix" value="/"></property>  
  64.             <property name="suffix" value=".jsp"></property>  
  65.     </bean>  
  66. </beans>  


applicationConsumer.xml文件代码以下: 

Java代码 

 收藏代码

  1. <?xml version="1.0" encoding="UTF-8"?>    
  2. <beans xmlns="http://www.springframework.org/schema/beans"    
  3.   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"    
  4.   xsi:schemaLocation="http://www.springframework.org/schema/beans    
  5.     http://www.springframework.org/schema/beans/spring-beans.xsd    
  6.     http://code.alibabatech.com/schema/dubbo    
  7.     http://code.alibabatech.com/schema/dubbo/dubbo.xsd ">          
  8.   <!-- 消费方应用名,用于计算依赖关系,不是匹配条件,不要与提供方同样 -->    
  9.   <dubbo:application name="consumer-of-shihuan-app" />       
  10.     <!-- 使用multicast广播注册中心暴露发现服务地址 -->    
  11.   <dubbo:registry  protocol="zookeeper" address="zookeeper://127.0.0.1:2181" />        
  12.     <!-- 生成远程服务代理,能够和本地bean同样使用demoService -->    
  13.   <dubbo:reference id="demoService" interface="com.shihuan.zooshare.service.CustomerService" />    
  14. </beans>  


logging.properties文件代码以下: 

Java代码 

 收藏代码

  1. handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler  
  2.   
  3. ############################################################  
  4. # Handler specific properties.  
  5. # Describes specific configuration info for Handlers.  
  6. ############################################################  
  7.   
  8. org.apache.juli.FileHandler.level = FINE  
  9. org.apache.juli.FileHandler.directory = ${catalina.base}/logs  
  10. org.apache.juli.FileHandler.prefix = error-debug.  
  11.   
  12. java.util.logging.ConsoleHandler.level = FINE  
  13. java.util.logging.ConsoleHandler.formatter =java.util.logging.SimpleFormatter  


web.xml文件代码以下: 

Java代码 

 收藏代码

  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <web-app version="2.5"   
  3.     xmlns="http://java.sun.com/xml/ns/javaee"   
  4.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   
  5.     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   
  6.     http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">  
  7.       
  8.     <display-name>dubboweb</display-name>  
  9.   <context-param>  
  10.     <param-name>dubbowebRootKey</param-name>  
  11.     <param-value>dubboweb.root</param-value>  
  12.   </context-param>  
  13.   <context-param>  
  14.     <param-name>contextConfigLocation</param-name>  
  15.     <param-value>classpath:jdbc-context.xml,classpath:applicationConsumer.xml</param-value>  
  16.   </context-param>  
  17.   <listener>  
  18.     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>  
  19.   </listener>  
  20.       
  21.     <servlet>  
  22.     <servlet-name>spring-mvc</servlet-name>  
  23.     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>  
  24.     <init-param>  
  25.       <param-name>contextConfigLocation</param-name>  
  26.       <param-value>classpath:springmvc-servlet.xml</param-value>  
  27.     </init-param>  
  28.     <load-on-startup>1</load-on-startup>  
  29.   </servlet>  
  30.   <servlet-mapping>  
  31.     <servlet-name>spring-mvc</servlet-name>  
  32.     <url-pattern>/</url-pattern>  
  33.   </servlet-mapping>  
  34.   <filter>  
  35.     <filter-name>encodingFilter</filter-name>  
  36.     <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>  
  37.     <init-param>  
  38.       <param-name>encoding</param-name>  
  39.       <param-value>UTF-8</param-value>  
  40.     </init-param>  
  41.     <init-param>  
  42.       <param-name>forceEncoding</param-name>  
  43.       <param-value>true</param-value>  
  44.     </init-param>  
  45.   </filter>  
  46.   <filter-mapping>  
  47.     <filter-name>encodingFilter</filter-name>  
  48.     <url-pattern>/*</url-pattern>  
  49.   </filter-mapping>  
  50.       
  51.       
  52.   <welcome-file-list>  
  53.     <welcome-file>index.jsp</welcome-file>  
  54.   </welcome-file-list>  
  55. </web-app>  


index.jsp文件代码以下: 

Java代码 

 收藏代码

  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>  
  2. <%  
  3. String path = request.getContextPath();  
  4. %>  
  5.   
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">  
  7. <html>  
  8.   <head>  
  9.       
  10.     <title>index.jsp starting page</title>  
  11.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  
  12.   </head>  
  13.     
  14.   <body>  
  15.     <form action="<%=path%>/duboo1.do" method="post">  
  16.         <input type="submit" value="submit" />  
  17.     </form>  
  18.   </body>  
  19. </html>  


DubboWebInterceptor.java文件代码以下: 

Java代码 

 收藏代码

  1. package com.shihuan.web.interceptor;  
  2.   
  3. import javax.servlet.http.HttpServletRequest;  
  4. import javax.servlet.http.HttpServletResponse;  
  5.   
  6. import org.springframework.web.servlet.ModelAndView;  
  7. import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;  
  8.   
  9. public class DubboWebInterceptor extends HandlerInterceptorAdapter {  
  10.   
  11.     public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {  
  12.         super.afterCompletion(request, response, handler, ex);  
  13.     }  
  14.       
  15.     public void postHandler(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {  
  16.         super.postHandle(request, response, handler, modelAndView);  
  17.     }  
  18.       
  19.     public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {  
  20.         String url = request.getRequestURI();  
  21.         System.out.println("ConsumerInterceptor.preHandle()" + url);  
  22.           
  23.         return super.preHandle(request, response, handler);  
  24.     }  
  25.       
  26. }  


DubboWebController.java文件代码以下: 

Java代码 

 收藏代码

  1. package com.shihuan.web.controller;  
  2.   
  3. import org.springframework.beans.factory.annotation.Autowired;  
  4. import org.springframework.stereotype.Controller;  
  5. import org.springframework.web.bind.annotation.RequestMapping;  
  6.   
  7. import com.shihuan.zooshare.service.CustomerService;  
  8.   
  9. @Controller  
  10. @RequestMapping(value="/")  
  11. public class DubboWebController {  
  12.   
  13.     @Autowired  
  14.     public CustomerService demoService;  
  15.       
  16.     @RequestMapping(value="duboo1")  
  17.     public String duboo1(){  
  18.         System.out.println("come into WebController ......");  
  19.         String zoosharestr = demoService.getName();  
  20.         System.out.println(zoosharestr);  
  21.         return "index";  
  22.     }  
  23.       
  24.     /* 
  25.     @RequestMapping(value="duboo1") 
  26.     public String duboo1(){ 
  27.         System.out.println("jinru......"); 
  28.         return "index"; 
  29.     } 
  30.     */  
  31.       
  32. }  


到此为止服务消费者代码编写完毕。 
把dubboweb工程部署到tomcat6的webapps目录下便可。 

【注】:各个模块的启动顺序不能错。 

第一步:启动zookeeper服务 
 
第二步:启动zooshare.jar服务,控制台应该输出"Press any key to exit." 
 
第三步:启动tomcat6 

第四步:访问http://127.0.0.1:8080/governance/applications/ 

第五步:访问http://127.0.0.1:8080/dubooweb/ 

第六步:查看tomcat6控制台和zooshare.jar服务控制台是否有正确输出,tomcat6控制台应该输出"come into WebController ......"和"print result !!!",zooshare.jar服务控制台应该输出"shihuan print !!!" 


都启动好了后,操做截图以下: 









 
 

核心技术:Maven,Springmvc mybatis shiro, Druid, Restful, Dubbo, ZooKeeper,Redis,FastDFS,ActiveMQ,Nginx 
分布式框架介绍 - kafkaee - kafkaee的博客

分布式框架介绍 - kafkaee - kafkaee的博客

分布式框架介绍 - kafkaee - kafkaee的博客

分布式框架介绍 - kafkaee - kafkaee的博客

相关文章
相关标签/搜索