`
carlosfu
  • 浏览: 585009 次
  • 性别: Icon_minigender_1
  • 来自: 北京
博客专栏
Ba8b5055-9c58-3ab0-8a1c-e710f0495d2c
BigMemory实战与理...
浏览量:31637
53b2087e-c637-34d2-b61d-257846f73ade
RedisCluster开...
浏览量:151405
C9f66038-7478-3388-8086-d20c1f535495
缓存的使用与设计
浏览量:125848
社区版块
存档分类
最新评论

dubbo快速实战(非最佳配置,演示用)

阅读更多

 一、目标:

    由于培训需要演示dubbo的快速实战,因此有了本文,再次声明,本文不是最佳配置。

    使用dubbo,构建一个provider提供视频信息服务,一个consumer获取视频信息服务并调用。

    

文中zookeeper配置的是127.0.0.1,请以真实ip为准

 

 

  二、准备:

1. 安装zookeeper:

   因为是演示,只安装一个zookeeper就好了,真实环境应该是集群。

   

 

 

2. 工程结构和依赖

<modules>
		<module>dubbo-train-provider</module>
		<module>dubbo-train-consumer</module>
		<module>dubbo-train-api</module>
	</modules>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<zookeeper>3.4.5</zookeeper>
		<curator.version>2.3.0</curator.version>
		<spring.version>3.2.5.RELEASE</spring.version>
		<slf4j.version>1.7.5</slf4j.version>
		<guava.version>15.0</guava.version>
		<dubbo.version>2.4.11</dubbo.version>
		<logback.version>1.0.13</logback.version>
		<javassist.version>3.18.2-GA</javassist.version>
	</properties>
	<dependencyManagement>
		<dependencies>

			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>

			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-core</artifactId>
				<version>${logback.version}</version>
			</dependency>

			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>${logback.version}</version>
			</dependency>

			<dependency>
				<groupId>org.apache.zookeeper</groupId>
				<artifactId>zookeeper</artifactId>
				<version>${zookeeper}</version>
				<exclusions>
					<exclusion>
						<groupId>org.slf4j</groupId>
						<artifactId>slf4j-log4j12</artifactId>
					</exclusion>
					<exclusion>
						<groupId>log4j</groupId>
						<artifactId>log4j</artifactId>
					</exclusion>
					<exclusion>
						<groupId>jline</groupId>
						<artifactId>jline</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.jboss.netty</groupId>
						<artifactId>netty</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-tx</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-core</artifactId>
				<version>${spring.version}</version>
				<exclusions>
					<exclusion>
						<groupId>commons-logging</groupId>
						<artifactId>commons-logging</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-beans</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-expression</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context-support</artifactId>
				<version>${spring.version}</version>
			</dependency>

			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-jdbc</artifactId>
				<version>${spring.version}</version>
			</dependency>

			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>${guava.version}</version>
			</dependency>

			<dependency>
				<groupId>org.javassist</groupId>
				<artifactId>javassist</artifactId>
				<version>${javassist.version}</version>
			</dependency>

			<dependency>
				<groupId>com.alibaba</groupId>
				<artifactId>dubbo</artifactId>
				<version>${dubbo.version}</version>
				<exclusions>
					<exclusion>
						<groupId>log4j</groupId>
						<artifactId>log4j</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.slf4j</groupId>
						<artifactId>slf4j-log4j12</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.springframework</groupId>
						<artifactId>spring</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.apache.zookeeper</groupId>
						<artifactId>zookeeper</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.apache.curator</groupId>
						<artifactId>curator-client</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.apache.curator</groupId>
						<artifactId>curator-recipes</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<dependency>
				<groupId>org.apache.curator</groupId>
				<artifactId>curator-recipes</artifactId>
				<version>${curator.version}</version>
				<exclusions>
					<exclusion>
						<groupId>com.google.guava</groupId>
						<artifactId>guava</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<dependency>
				<groupId>org.apache.curator</groupId>
				<artifactId>curator-client</artifactId>
				<version>${curator.version}</version>
				<exclusions>
					<exclusion>
						<groupId>com.google.guava</groupId>
						<artifactId>guava</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<dependency>
				<groupId>org.apache.curator</groupId>
				<artifactId>curator-framework</artifactId>
				<version>${curator.version}</version>
				<exclusions>
					<exclusion>
						<groupId>com.google.guava</groupId>
						<artifactId>guava</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

		</dependencies>
	</dependencyManagement>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
					<encoding>UTF-8</encoding>
					<includes>
						<include>**/*.*</include>
					</includes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<includes>
						<include>**/*.*</include>
					</includes>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.4.3</version>
				<configuration>
					<skipTests>true</skipTests>
				</configuration>
			</plugin>

		</plugins>
	</build>

 

 

3. logback配置:

<?xml version="1.0" encoding="UTF-8"?>  
<configuration scan="true" scanPeriod="5 seconds">  
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">  
        <encoder>  
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>  
        </encoder>  
    </appender>  
    <root level="INFO">  
        <appender-ref ref="STDOUT"/>  
    </root>  
</configuration>

 

 

 

  三、快速开始

 

1. api

(1) 定义视频信息服务接口:

 

package com.sohu.tv.dubbo.train.api;

import com.sohu.tv.dubbo.train.api.bean.VideoInfo;

/**
 * 视频信息接口
 * 
 * @author leifu
 * @Date 2016年2月15日
 * @Time 下午3:14:48
 */
public interface VideoService {

    /**
     * 通过视频id获取视频信息
     * 
     * @param id
     * @return
     */
    VideoInfo get(long id);

}
 

 

(2) 定义视频信息javabean:

 

package com.sohu.tv.dubbo.train.api.bean;

import java.io.Serializable;

/**
 * 视频信息bean
 * @author leifu
 * @Date 2016年2月15日
 * @Time 下午3:16:19
 */
public class VideoInfo implements Serializable {

    private static final long serialVersionUID = -3767840728003002950L;

    private long id;

    private String name;

    private String info;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    @Override
    public String toString() {
        return "VideoInfo [id=" + id + ", name=" + name + ", info=" + info + "]";
    }

}
 

 

 

2. provider:

(1) 代码

(a) 视频信息服务实现类:

 

package com.sohu.tv.dubbo.train.provider.service.impl;

import com.sohu.tv.dubbo.train.api.VideoService;
import com.sohu.tv.dubbo.train.api.bean.VideoInfo;
import com.sohu.tv.dubbo.train.provider.mock.RedisVideoInfoMock;

/**
 * 视频信息实现
 * @author leifu
 * @Date 2016年2月15日
 * @Time 下午3:22:11
 */
public class VideoServiceImpl implements VideoService {

    private RedisVideoInfoMock redisVideoInfoMock;

    @Override
    public VideoInfo get(long id) {
        return redisVideoInfoMock.get(id);
    }

    public void setRedisVideoInfoMock(RedisVideoInfoMock redisVideoInfoMock) {
        this.redisVideoInfoMock = redisVideoInfoMock;
    }


}

 

 

(b) RedisVideoInfoMock是视频信息的Mock类:

package com.sohu.tv.dubbo.train.provider.mock;

import com.sohu.tv.dubbo.train.api.bean.VideoInfo;

/**
 * redisMock视频信息
 * @author leifu
 * @Date 2016年2月15日
 * @Time 下午3:23:50
 */
public class RedisVideoInfoMock {

    /**
     * 通过id获取视频信息
     * @param id
     * @return
     */
    public VideoInfo get(long id) {
        VideoInfo videoInfo = new VideoInfo();
        videoInfo.setId(id);
        videoInfo.setName("视频名:" + id);
        videoInfo.setInfo("视频描述:" + id);
        return videoInfo;
    }

}

 

(c) 启动dubbo的provider:

package com.sohu.tv.dubbo.train.provider.main;

/**
 * dubbo-provider Main
 * 
 * @author leifu
 * @Date 2016年2月15日
 * @Time 下午4:01:41
 */
public class TrainProviderMain {

    public static void main(String[] args) {
        com.alibaba.dubbo.container.Main.main(args);
    }

}

 

(2) 配置文件:

 

(a) dubbo.properties

dubbo.container=logback,spring
dubbo.application.name=dubbo-train-provider
dubbo.application.owner=leifu
dubbo.application.logger=slf4j
dubbo.registry.address=zookeeper://127.0.0.1:2181?client=curator
dubbo.registry.timeout=8000
dubbo.protocol.name=dubbo
dubbo.protocol.port=20880
dubbo.protocol.serialization=dubbo
dubbo.protocol.threadpool=fixed
dubbo.protocol.iothreads=17
dubbo.monitor.protocol=registry
dubbo.spring.config=classpath*:spring/*.xml

 

(b) spring配置文件:dubbo-train-provider.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://code.alibabatech.com/schema/dubbo
        http://code.alibabatech.com/schema/dubbo/dubbo.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.0.xsd"
       default-autowire="byName">
	
	<bean id="redisVideoInfoMock" class="com.sohu.tv.dubbo.train.provider.mock.RedisVideoInfoMock"/>

	<bean id="videoService" class="com.sohu.tv.dubbo.train.provider.service.impl.VideoServiceImpl" />

	<dubbo:service interface="com.sohu.tv.dubbo.train.api.VideoService" ref="videoService" />

</beans>

 

(c) logback.xml

<?xml version="1.0" encoding="UTF-8"?>  
<configuration scan="true" scanPeriod="5 seconds">  
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">  
        <encoder>  
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>  
        </encoder>  
    </appender>  
    <root level="INFO">  
        <appender-ref ref="STDOUT"/>  
    </root>  
</configuration>  

 

 

 

 

3.consumer

(1) 代码:

(a) videoService的消费者类:

package com.sohu.tv.dubbo.train.consumer.action;

import java.util.Random;
import java.util.concurrent.TimeUnit;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.sohu.tv.dubbo.train.api.VideoService;
import com.sohu.tv.dubbo.train.api.bean.VideoInfo;

/**
 * 消费者
 * @author leifu
 * @Date 2016年2月15日
 * @Time 下午3:54:16
 */
public class TrainConsumerAction {
    
    private Logger logger = LoggerFactory.getLogger(TrainConsumerAction.class);
    
    private VideoService videoService;

    public void start() throws Exception {
        while (true) {
            try {
                long id = new Random().nextLong();
                VideoInfo videoInfo = videoService.get(id);
                System.out.println(videoInfo);
                logger.info(videoInfo.toString());
                TimeUnit.SECONDS.sleep(1);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    public void setVideoService(VideoService videoService) {
        this.videoService = videoService;
    }

}

  

 (b) dubbo消费者启动类:

package com.sohu.tv.dubbo.train.consumer.main;

/**
 * dubbo-consumer开始
 * 
 * @author leifu
 * @Date 2016年2月15日
 * @Time 下午4:01:15
 */
public class TrainConsumerMain {

    public static void main(String[] args) {
        com.alibaba.dubbo.container.Main.main(args);
    }

}

 

(2) 配置:

(a) dubbo.properties:

dubbo.container=logback,spring
dubbo.application.name=dubbo-train-consumer
dubbo.application.owner=carlosfu
dubbo.application.logger=slf4j
dubbo.registry.address=zookeeper://127.0.0.1:2181?client=curator
dubbo.monitor.protocol=registry
dubbo.spring.config=classpath*:spring/*.xml

(b) 消费者spring配置:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://code.alibabatech.com/schema/dubbo
        http://code.alibabatech.com/schema/dubbo/dubbo.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.0.xsd"
       default-autowire="byName">

	<dubbo:reference id="videoService" interface="com.sohu.tv.dubbo.train.api.VideoService" />

	<bean id="trainConsumerAction" class="com.sohu.tv.dubbo.train.consumer.action.TrainConsumerAction" init-method="start"></bean>

</beans>

 

 四、测试:

 

1.zookeeper有provider和consumer的节点:

 

   

 

2. consumer调用provider:

 

    provider启动日志

17:55:49.283 [main] INFO  c.a.d.common.logger.LoggerFactory - using logger: com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter
17:55:49.330 [main] INFO  com.alibaba.dubbo.container.Main -  [DUBBO] Use container type([logback, spring]) to run dubbo serivce., dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
17:55:49.330 [main] INFO  com.alibaba.dubbo.container.Main -  [DUBBO] Dubbo LogbackContainer started!, dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
二月 15, 2016 5:55:49 下午 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@511d9ca5: startup date [Mon Feb 15 17:55:49 CST 2016]; root of context hierarchy
二月 15, 2016 5:55:49 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from file [D:\git-project\dubbo-train\dubbo-train-provider\target\classes\spring\dubbo-train-provider.xml]
二月 15, 2016 5:55:49 下午 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2d09c79b: defining beans [redisVideoInfoMock,videoService,com.sohu.tv.dubbo.train.api.VideoService]; root of factory hierarchy
17:55:49.849 [main] INFO  c.a.dubbo.config.AbstractConfig -  [DUBBO] The service ready on spring started. service: com.sohu.tv.dubbo.train.api.VideoService, dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
17:55:49.854 [main] INFO  c.a.d.common.logger.LoggerFactory - using logger: com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter
17:55:49.980 [main] INFO  c.a.dubbo.config.AbstractConfig -  [DUBBO] Export dubbo service com.sohu.tv.dubbo.train.api.VideoService to local registry, dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
17:55:49.980 [main] INFO  c.a.dubbo.config.AbstractConfig -  [DUBBO] Export dubbo service com.sohu.tv.dubbo.train.api.VideoService to url dubbo://10.7.40.98:20880/com.sohu.tv.dubbo.train.api.VideoService?anyhost=true&application=dubbo-train-provider&dubbo=2.4.12a-SNAPSHOT&interface=com.sohu.tv.dubbo.train.api.VideoService&iothreads=17&logger=slf4j&methods=get&owner=leifu&pid=87888&serialization=dubbo&side=provider&threadpool=fixed&timestamp=1455530149876, dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
17:55:49.982 [main] INFO  c.a.dubbo.config.AbstractConfig -  [DUBBO] Register dubbo service com.sohu.tv.dubbo.train.api.VideoService url dubbo://10.7.40.98:20880/com.sohu.tv.dubbo.train.api.VideoService?anyhost=true&application=dubbo-train-provider&dubbo=2.4.12a-SNAPSHOT&interface=com.sohu.tv.dubbo.train.api.VideoService&iothreads=17&logger=slf4j&methods=get&monitor=dubbo%3A%2F%2F10.16.14.251%3A2181%2Fcom.alibaba.dubbo.registry.RegistryService%3Fapplication%3Ddubbo-train-provider%26client%3Dcurator%26dubbo%3D2.4.12a-SNAPSHOT%26logger%3Dslf4j%26owner%3Dleifu%26pid%3D87888%26protocol%3Dregistry%26refer%3Ddubbo%253D2.4.12a-SNAPSHOT%2526interface%253Dcom.alibaba.dubbo.monitor.MonitorService%2526pid%253D87888%2526timestamp%253D1455530149981%26registry%3Dzookeeper%26timeout%3D8000%26timestamp%3D1455530149867&owner=leifu&pid=87888&serialization=dubbo&side=provider&threadpool=fixed&timestamp=1455530149876 to registry registry://10.16.14.251:2181/com.alibaba.dubbo.registry.RegistryService?application=dubbo-train-provider&client=curator&dubbo=2.4.12a-SNAPSHOT&logger=slf4j&owner=leifu&pid=87888&registry=zookeeper&timeout=8000&timestamp=1455530149867, dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
17:55:50.171 [main] INFO  c.a.d.r.transport.AbstractServer -  [DUBBO] Start NettyServer bind /0.0.0.0:20880, export /10.7.40.98:20880, dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
...........................
17:55:50.262 [main] INFO  o.a.c.f.imps.CuratorFrameworkImpl - Starting
17:55:50.269 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT
17:55:50.269 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:host.name=FULEI-TJ.sohu-inc.com
17:55:50.269 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.version=1.7.0_55
17:55:50.269 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.vendor=Oracle Corporation
17:55:50.270 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.home=C:\Program Files\Java\jdk1.7.0_55\jre
17:55:50.270 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.class.path=D:\git-project\dubbo-train\dubbo-train-provider\target\classes;D:\mavenRespo\respo\org\slf4j\slf4j-api\1.7.5\slf4j-api-1.7.5.jar;D:\mavenRespo\respo\ch\qos\logback\logback-core\1.0.13\logback-core-1.0.13.jar;D:\mavenRespo\respo\ch\qos\logback\logback-classic\1.0.13\logback-classic-1.0.13.jar;D:\mavenRespo\respo\org\apache\zookeeper\zookeeper\3.4.5\zookeeper-3.4.5.jar;D:\mavenRespo\respo\org\springframework\spring-tx\3.2.5.RELEASE\spring-tx-3.2.5.RELEASE.jar;D:\mavenRespo\respo\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;D:\mavenRespo\respo\org\springframework\spring-core\3.2.5.RELEASE\spring-core-3.2.5.RELEASE.jar;D:\mavenRespo\respo\org\springframework\spring-beans\3.2.5.RELEASE\spring-beans-3.2.5.RELEASE.jar;D:\mavenRespo\respo\org\springframework\spring-expression\3.2.5.RELEASE\spring-expression-3.2.5.RELEASE.jar;D:\mavenRespo\respo\org\springframework\spring-context\3.2.5.RELEASE\spring-context-3.2.5.RELEASE.jar;D:\mavenRespo\respo\org\springframework\spring-aop\3.2.5.RELEASE\spring-aop-3.2.5.RELEASE.jar;D:\mavenRespo\respo\org\springframework\spring-context-support\3.2.5.RELEASE\spring-context-support-3.2.5.RELEASE.jar;D:\mavenRespo\respo\com\google\guava\guava\15.0\guava-15.0.jar;D:\mavenRespo\respo\org\javassist\javassist\3.18.2-GA\javassist-3.18.2-GA.jar;D:\mavenRespo\respo\com\alibaba\dubbo\2.4.12a-SNAPSHOT\dubbo-2.4.12a-SNAPSHOT.jar;D:\mavenRespo\respo\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;D:\mavenRespo\respo\io\netty\netty\3.10.4.Final\netty-3.10.4.Final.jar;D:\mavenRespo\respo\com\caucho\hessian\4.0.7\hessian-4.0.7.jar;D:\mavenRespo\respo\jline\jline\0.9.94\jline-0.9.94.jar;D:\mavenRespo\respo\junit\junit\3.8.1\junit-3.8.1.jar;D:\mavenRespo\respo\org\apache\curator\curator-recipes\2.3.0\curator-recipes-2.3.0.jar;D:\mavenRespo\respo\org\apache\curator\curator-client\2.3.0\curator-client-2.3.0.jar;D:\mavenRespo\respo\org\apache\curator\curator-framework\2.3.0\curator-framework-2.3.0.jar;D:\git-project\dubbo-train\dubbo-train-api\target\classes
17:55:50.270 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.library.path=C:\Program Files\Java\jdk1.7.0_55\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Common Files\NetSarang;C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.7.0_55\bin;d:\AppServ\MySQL\bin;C:\Python27;D:\maven-3.1.0\bin;C:\apache-ant-1.9.3\bin;.
17:55:50.270 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.io.tmpdir=C:\Users\leifu\AppData\Local\Temp\
17:55:50.270 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.compiler=<NA>
17:55:50.270 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:os.name=Windows 7
17:55:50.270 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:os.arch=amd64
17:55:50.270 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:os.version=6.1
17:55:50.270 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:user.name=leifu
17:55:50.270 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:user.home=C:\Users\leifu
17:55:50.270 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:user.dir=D:\git-project\dubbo-train\dubbo-train-provider
17:55:50.271 [main] INFO  org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=10.16.14.251:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@7be97a62
17:55:50.287 [main] INFO  c.a.d.r.zookeeper.ZookeeperRegistry -  [DUBBO] Register: dubbo://10.7.40.98:20880/com.sohu.tv.dubbo.train.api.VideoService?anyhost=true&application=dubbo-train-provider&dubbo=2.4.12a-SNAPSHOT&interface=com.sohu.tv.dubbo.train.api.VideoService&iothreads=17&logger=slf4j&methods=get&owner=leifu&pid=87888&serialization=dubbo&side=provider&threadpool=fixed&timestamp=1455530149876, dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
17:55:59.293 [main-SendThread(10.16.14.251:2181)] INFO  org.apache.zookeeper.ClientCnxn - Opening socket connection to server 10.16.14.251/10.16.14.251:2181. Will not attempt to authenticate using SASL (unknown error)
17:55:59.307 [main-SendThread(10.16.14.251:2181)] INFO  org.apache.zookeeper.ClientCnxn - Socket connection established to 10.16.14.251/10.16.14.251:2181, initiating session
17:55:59.326 [main-SendThread(10.16.14.251:2181)] INFO  org.apache.zookeeper.ClientCnxn - Session establishment complete on server 10.16.14.251/10.16.14.251:2181, sessionid = 0x14bdeb5224b5431, negotiated timeout = 60000
17:55:59.329 [main-EventThread] INFO  o.a.c.f.state.ConnectionStateManager - State change: CONNECTED
17:56:00.405 [main] INFO  c.a.d.r.zookeeper.ZookeeperRegistry -  [DUBBO] Subscribe: provider://10.7.40.98:20880/com.sohu.tv.dubbo.train.api.VideoService?anyhost=true&application=dubbo-train-provider&category=configurators&check=false&dubbo=2.4.12a-SNAPSHOT&interface=com.sohu.tv.dubbo.train.api.VideoService&iothreads=17&logger=slf4j&methods=get&owner=leifu&pid=87888&serialization=dubbo&side=provider&threadpool=fixed&timestamp=1455530149876, dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
17:56:00.466 [main] INFO  c.a.d.r.zookeeper.ZookeeperRegistry -  [DUBBO] Notify urls for subscribe url provider://10.7.40.98:20880/com.sohu.tv.dubbo.train.api.VideoService?anyhost=true&application=dubbo-train-provider&category=configurators&check=false&dubbo=2.4.12a-SNAPSHOT&interface=com.sohu.tv.dubbo.train.api.VideoService&iothreads=17&logger=slf4j&methods=get&owner=leifu&pid=87888&serialization=dubbo&side=provider&threadpool=fixed&timestamp=1455530149876, urls: [empty://10.7.40.98:20880/com.sohu.tv.dubbo.train.api.VideoService?anyhost=true&application=dubbo-train-provider&category=configurators&check=false&dubbo=2.4.12a-SNAPSHOT&interface=com.sohu.tv.dubbo.train.api.VideoService&iothreads=17&logger=slf4j&methods=get&owner=leifu&pid=87888&serialization=dubbo&side=provider&threadpool=fixed&timestamp=1455530149876], dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
17:56:00.491 [main] INFO  com.alibaba.dubbo.container.Main -  [DUBBO] Dubbo SpringContainer started!, dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
[2016-02-15 17:56:00] Dubbo service server started!

 

    consumer启动日志:

17:56:30.375 [main] INFO  c.a.d.common.logger.LoggerFactory - using logger: com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter
17:56:30.421 [main] INFO  com.alibaba.dubbo.container.Main -  [DUBBO] Use container type([logback, spring]) to run dubbo serivce., dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
17:56:30.421 [main] INFO  com.alibaba.dubbo.container.Main -  [DUBBO] Dubbo LogbackContainer started!, dubbo version: 2.4.12a-SNAPSHOT, current host: 127.0.0.1
二月 15, 2016 5:56:30 下午 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@511d9ca5: startup date [Mon Feb 15 17:56:30 CST 2016]; root of context hierarchy
二月 15, 2016 5:56:30 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from file [D:\git-project\dubbo-train\dubbo-train-consumer\target\classes\spring\dubbo-train-consumer.xml]
二月 15, 2016 5:56:30 下午 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2cdbf42e: defining beans [videoService,trainConsumerAction]; root of factory hierarchy
17:56:30.944 [main] INFO  c.a.d.common.logger.LoggerFactory - using logger: com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter
.....................
17:56:31.088 [main] INFO  o.a.c.f.imps.CuratorFrameworkImpl - Starting
17:56:31.095 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:host.name=FULEI-TJ.sohu-inc.com
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.version=1.7.0_55
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.vendor=Oracle Corporation
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.home=C:\Program Files\Java\jdk1.7.0_55\jre
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.class.path=D:\git-project\dubbo-train\dubbo-train-consumer\target\classes;D:\mavenRespo\respo\org\slf4j\slf4j-api\1.7.5\slf4j-api-1.7.5.jar;D:\mavenRespo\respo\ch\qos\logback\logback-core\1.0.13\logback-core-1.0.13.jar;D:\mavenRespo\respo\ch\qos\logback\logback-classic\1.0.13\logback-classic-1.0.13.jar;D:\mavenRespo\respo\org\apache\zookeeper\zookeeper\3.4.5\zookeeper-3.4.5.jar;D:\mavenRespo\respo\org\springframework\spring-tx\3.2.5.RELEASE\spring-tx-3.2.5.RELEASE.jar;D:\mavenRespo\respo\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;D:\mavenRespo\respo\org\springframework\spring-core\3.2.5.RELEASE\spring-core-3.2.5.RELEASE.jar;D:\mavenRespo\respo\org\springframework\spring-beans\3.2.5.RELEASE\spring-beans-3.2.5.RELEASE.jar;D:\mavenRespo\respo\org\springframework\spring-expression\3.2.5.RELEASE\spring-expression-3.2.5.RELEASE.jar;D:\mavenRespo\respo\org\springframework\spring-context\3.2.5.RELEASE\spring-context-3.2.5.RELEASE.jar;D:\mavenRespo\respo\org\springframework\spring-aop\3.2.5.RELEASE\spring-aop-3.2.5.RELEASE.jar;D:\mavenRespo\respo\org\springframework\spring-context-support\3.2.5.RELEASE\spring-context-support-3.2.5.RELEASE.jar;D:\mavenRespo\respo\com\google\guava\guava\15.0\guava-15.0.jar;D:\mavenRespo\respo\org\javassist\javassist\3.18.2-GA\javassist-3.18.2-GA.jar;D:\mavenRespo\respo\com\alibaba\dubbo\2.4.12a-SNAPSHOT\dubbo-2.4.12a-SNAPSHOT.jar;D:\mavenRespo\respo\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;D:\mavenRespo\respo\io\netty\netty\3.10.4.Final\netty-3.10.4.Final.jar;D:\mavenRespo\respo\com\caucho\hessian\4.0.7\hessian-4.0.7.jar;D:\mavenRespo\respo\jline\jline\0.9.94\jline-0.9.94.jar;D:\mavenRespo\respo\junit\junit\3.8.1\junit-3.8.1.jar;D:\mavenRespo\respo\org\apache\curator\curator-recipes\2.3.0\curator-recipes-2.3.0.jar;D:\mavenRespo\respo\org\apache\curator\curator-client\2.3.0\curator-client-2.3.0.jar;D:\mavenRespo\respo\org\apache\curator\curator-framework\2.3.0\curator-framework-2.3.0.jar;D:\git-project\dubbo-train\dubbo-train-api\target\classes
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.library.path=C:\Program Files\Java\jdk1.7.0_55\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Common Files\NetSarang;C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.7.0_55\bin;d:\AppServ\MySQL\bin;C:\Python27;D:\maven-3.1.0\bin;C:\apache-ant-1.9.3\bin;.
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.io.tmpdir=C:\Users\leifu\AppData\Local\Temp\
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:java.compiler=<NA>
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:os.name=Windows 7
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:os.arch=amd64
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:os.version=6.1
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:user.name=leifu
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:user.home=C:\Users\leifu
17:56:31.096 [main] INFO  org.apache.zookeeper.ZooKeeper - Client environment:user.dir=D:\git-project\dubbo-train\dubbo-train-consumer
17:56:31.097 [main] INFO  org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=10.16.14.251:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@1038aa1e
17:56:31.152 [main] INFO  c.a.d.r.zookeeper.ZookeeperRegistry -  [DUBBO] Register: consumer://10.7.40.98/com.sohu.tv.dubbo.train.api.VideoService?application=dubbo-train-consumer&category=consumers&check=false&connected=false&dubbo=2.4.12a-SNAPSHOT&interface=com.sohu.tv.dubbo.train.api.VideoService&logger=slf4j&methods=get&owner=carlosfu&pid=92868&side=consumer&timestamp=1455530190945, dubbo version: 2.4.12a-SNAPSHOT, current host: 10.7.40.98
17:56:40.136 [main-SendThread(10.16.14.251:2181)] INFO  org.apache.zookeeper.ClientCnxn - Opening socket connection to server 10.16.14.251/10.16.14.251:2181. Will not attempt to authenticate using SASL (unknown error)
17:56:40.150 [main-SendThread(10.16.14.251:2181)] INFO  org.apache.zookeeper.ClientCnxn - Socket connection established to 10.16.14.251/10.16.14.251:2181, initiating session
17:56:40.172 [main-SendThread(10.16.14.251:2181)] INFO  org.apache.zookeeper.ClientCnxn - Session establishment complete on server 10.16.14.251/10.16.14.251:2181, sessionid = 0x14bdeb5224b5432, negotiated timeout = 60000
17:56:40.176 [main-EventThread] INFO  o.a.c.f.state.ConnectionStateManager - State change: CONNECTED
17:56:41.255 [main] INFO  c.a.d.r.zookeeper.ZookeeperRegistry -  [DUBBO] Subscribe: consumer://10.7.40.98/com.sohu.tv.dubbo.train.api.VideoService?application=dubbo-train-consumer&category=providers,configurators,routers&connected=false&dubbo=2.4.12a-SNAPSHOT&interface=com.sohu.tv.dubbo.train.api.VideoService&logger=slf4j&methods=get&owner=carlosfu&pid=92868&side=consumer&timestamp=1455530190945, dubbo version: 2.4.12a-SNAPSHOT, current host: 10.7.40.98
17:56:41.428 [main] INFO  c.a.d.r.zookeeper.ZookeeperRegistry -  [DUBBO] Notify urls for subscribe url consumer://10.7.40.98/com.sohu.tv.dubbo.train.api.VideoService?application=dubbo-train-consumer&category=providers,configurators,routers&connected=false&dubbo=2.4.12a-SNAPSHOT&interface=com.sohu.tv.dubbo.train.api.VideoService&logger=slf4j&methods=get&owner=carlosfu&pid=92868&side=consumer&timestamp=1455530190945, urls: [dubbo://10.7.40.98:20880/com.sohu.tv.dubbo.train.api.VideoService?anyhost=true&application=dubbo-train-provider&dubbo=2.4.12a-SNAPSHOT&interface=com.sohu.tv.dubbo.train.api.VideoService&iothreads=17&logger=slf4j&methods=get&owner=leifu&pid=87888&serialization=dubbo&side=provider&threadpool=fixed&timestamp=1455530149876, empty://10.7.40.98/com.sohu.tv.dubbo.train.api.VideoService?application=dubbo-train-consumer&category=configurators&connected=false&dubbo=2.4.12a-SNAPSHOT&interface=com.sohu.tv.dubbo.train.api.VideoService&logger=slf4j&methods=get&owner=carlosfu&pid=92868&side=consumer&timestamp=1455530190945, empty://10.7.40.98/com.sohu.tv.dubbo.train.api.VideoService?application=dubbo-train-consumer&category=routers&connected=false&dubbo=2.4.12a-SNAPSHOT&interface=com.sohu.tv.dubbo.train.api.VideoService&logger=slf4j&methods=get&owner=carlosfu&pid=92868&side=consumer&timestamp=1455530190945], dubbo version: 2.4.12a-SNAPSHOT, current host: 10.7.40.98
17:56:41.575 [main] INFO  c.a.d.r.transport.AbstractClient -  [DUBBO] Successed connect to server /10.7.40.98:20880 from NettyClient 10.7.40.98 using dubbo version 2.4.12a-SNAPSHOT, channel is NettyChannel [channel=[id: 0x5b078ade, /10.7.40.98:56957 => /10.7.40.98:20880]], dubbo version: 2.4.12a-SNAPSHOT, current host: 10.7.40.98
17:56:41.575 [main] INFO  c.a.d.r.transport.AbstractClient -  [DUBBO] Start NettyClient FULEI-TJ/10.7.40.98 connect to the server /10.7.40.98:20880, dubbo version: 2.4.12a-SNAPSHOT, current host: 10.7.40.98
17:56:41.627 [main] INFO  c.a.dubbo.config.AbstractConfig -  [DUBBO] Refer dubbo service com.sohu.tv.dubbo.train.api.VideoService from url zookeeper://10.16.14.251:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbo-train-consumer&check=false&connected=true&dubbo=2.4.12a-SNAPSHOT&inside.invoker.count=1&inside.invokers=dubbo%3A%2F%2F10.7.40.98%3A20880%2Fcom.sohu.tv.dubbo.train.api.VideoService%3Fanyhost%3Dtrue%26application%3Ddubbo-train-provider%26dubbo%3D2.4.12a-SNAPSHOT%26interface%3Dcom.sohu.tv.dubbo.train.api.VideoService%26iothreads%3D17%26logger%3Dslf4j%26methods%3Dget%26owner%3Dleifu%26pid%3D87888%26serialization%3Ddubbo%26side%3Dprovider%26threadpool%3Dfixed%26timestamp%3D1455530149876&interface=com.sohu.tv.dubbo.train.api.VideoService&iothreads=17&logger=slf4j&methods=get&monitor=dubbo%3A%2F%2F10.16.14.251%3A2181%2Fcom.alibaba.dubbo.registry.RegistryService%3Fapplication%3Ddubbo-train-consumer%26client%3Dcurator%26dubbo%3D2.4.12a-SNAPSHOT%26logger%3Dslf4j%26owner%3Dcarlosfu%26pid%3D92868%26protocol%3Dregistry%26refer%3Ddubbo%253D2.4.12a-SNAPSHOT%2526interface%253Dcom.alibaba.dubbo.monitor.MonitorService%2526pid%253D92868%2526timestamp%253D1455530190985%26registry%3Dzookeeper%26timestamp%3D1455530190980&owner=carlosfu&pid=92868&serialization=dubbo&side=consumer&timestamp=1455530190945, dubbo version: 2.4.12a-SNAPSHOT, current host: 10.7.40.98
17:56:42.004 [main] INFO  c.a.d.r.zookeeper.ZookeeperRegistry -  [DUBBO] Register: consumer://10.7.40.98/com.alibaba.dubbo.monitor.MonitorService?category=consumers&check=false&connected=true&dubbo=2.4.12a-SNAPSHOT&interface=com.alibaba.dubbo.monitor.MonitorService&pid=92868&timestamp=1455530190985, dubbo version: 2.4.12a-SNAPSHOT, current host: 10.7.40.98
17:56:42.056 [main] INFO  c.a.d.r.zookeeper.ZookeeperRegistry -  [DUBBO] Subscribe: consumer://10.7.40.98/com.alibaba.dubbo.monitor.MonitorService?category=providers,configurators,routers&connected=true&dubbo=2.4.12a-SNAPSHOT&interface=com.alibaba.dubbo.monitor.MonitorService&pid=92868&timestamp=1455530190985, dubbo version: 2.4.12a-SNAPSHOT, current host: 10.7.40.98
17:56:42.217 [main] INFO  c.a.d.r.zookeeper.ZookeeperRegistry -  [DUBBO] Notify urls for subscribe url consumer://10.7.40.98/com.alibaba.dubbo.monitor.MonitorService?category=providers,configurators,routers&connected=true&dubbo=2.4.12a-SNAPSHOT&interface=com.alibaba.dubbo.monitor.MonitorService&pid=92868&timestamp=1455530190985, urls: [dubbo://10.16.14.153:6060/com.alibaba.dubbo.monitor.MonitorService?anyhost=true&application=dubbo-monitor&delay=-1&dubbo=2.4.12a-SNAPSHOT&interface=com.alibaba.dubbo.monitor.MonitorService&methods=lookup,collect&owner=leifu&pid=24004&revision=2.4.12a-SNAPSHOT&side=provider&timestamp=1453775541485, empty://10.7.40.98/com.alibaba.dubbo.monitor.MonitorService?category=configurators&connected=true&dubbo=2.4.12a-SNAPSHOT&interface=com.alibaba.dubbo.monitor.MonitorService&pid=92868&timestamp=1455530190985, empty://10.7.40.98/com.alibaba.dubbo.monitor.MonitorService?category=routers&connected=true&dubbo=2.4.12a-SNAPSHOT&interface=com.alibaba.dubbo.monitor.MonitorService&pid=92868&timestamp=1455530190985], dubbo version: 2.4.12a-SNAPSHOT, current host: 10.7.40.98
17:56:42.225 [main] INFO  c.a.d.r.transport.AbstractClient -  [DUBBO] Successed connect to server /10.16.14.153:6060 from NettyClient 10.7.40.98 using dubbo version 2.4.12a-SNAPSHOT, channel is NettyChannel [channel=[id: 0x5cf6ee92, /10.7.40.98:56971 => /10.16.14.153:6060]], dubbo version: 2.4.12a-SNAPSHOT, current host: 10.7.40.98
17:56:42.225 [main] INFO  c.a.d.r.transport.AbstractClient -  [DUBBO] Start NettyClient FULEI-TJ/10.7.40.98 connect to the server /10.16.14.153:6060, dubbo version: 2.4.12a-SNAPSHOT, current host: 10.7.40.98
VideoInfo [id=1571379734545151673, name=视频名:1571379734545151673, info=视频描述:1571379734545151673]
17:56:42.233 [main] INFO  c.s.t.d.t.c.a.TrainConsumerAction - VideoInfo [id=1571379734545151673, name=视频名:1571379734545151673, info=视频描述:1571379734545151673]
VideoInfo [id=-8451105473690279115, name=视频名:-8451105473690279115, info=视频描述:-8451105473690279115]
17:56:43.236 [main] INFO  c.s.t.d.t.c.a.TrainConsumerAction - VideoInfo [id=-8451105473690279115, name=视频名:-8451105473690279115, info=视频描述:-8451105473690279115]
VideoInfo [id=5227312763746681516, name=视频名:5227312763746681516, info=视频描述:5227312763746681516]
17:56:44.239 [main] INFO  c.s.t.d.t.c.a.TrainConsumerAction - VideoInfo [id=5227312763746681516, name=视频名:5227312763746681516, info=视频描述:5227312763746681516]
VideoInfo [id=37036120943992274, name=视频名:37036120943992274, info=视频描述:37036120943992274]
17:56:45.241 [main] INFO  c.s.t.d.t.c.a.TrainConsumerAction - VideoInfo [id=37036120943992274, name=视频名:37036120943992274, info=视频描述:37036120943992274]
VideoInfo [id=-2092250957867316795, name=视频名:-2092250957867316795, info=视频描述:-2092250957867316795]
17:56:46.244 [main] INFO  c.s.t.d.t.c.a.TrainConsumerAction - VideoInfo [id=-2092250957867316795, name=视频名:-2092250957867316795, info=视频描述:-2092250957867316795]
VideoInfo [id=-636500617330674946, name=视频名:-636500617330674946, info=视频描述:-636500617330674946]
17:56:47.247 [main] INFO  c.s.t.d.t.c.a.TrainConsumerAction - VideoInfo [id=-636500617330674946, name=视频名:-636500617330674946, info=视频描述:-636500617330674946]
VideoInfo [id=-3676813828951475060, name=视频名:-3676813828951475060, info=视频描述:-3676813828951475060]
17:56:48.250 [main] INFO  c.s.t.d.t.c.a.TrainConsumerAction - VideoInfo [id=-3676813828951475060, name=视频名:-3676813828951475060, info=视频描述:-3676813828951475060]

 

 

 

  • 大小: 78 KB
  • 大小: 19.1 KB
分享到:
评论

相关推荐

    Dubbo培训与实战

    2. **配置Dubbo与Zookeeper的集成**:在Dubbo的配置文件中指定使用Zookeeper作为注册中心,并配置相应的地址信息。 3. **启动与监控Zookeeper**:启动Zookeeper服务器,并根据需要使用Taobao提供的Zookeeper监控...

    面试必备技能之Dubbo企业实战

    8. **Spring整合**:Dubbo通常与Spring框架结合使用,通过XML配置或注解方式进行服务的声明和引用,熟悉Spring的AOP、IOC等特性对使用Dubbo大有裨益。 9. **实战经验**:在面试中,除了理论知识,面试官往往更看重...

    基于Dubbo的分布式系统架构实战(百度云链接)

    基于Dubbo的分布式系统架构实战(百度云链接),基于Dubbo的分布式系统架构实战(百度云链接),基于Dubbo的分布式系统架构实战(百度云链接)

    dubbo示例+dubbo官方配置文档+dubbo培训ppt

    通过这些培训材料,我们可以快速了解Dubbo的工作原理,学习如何发布和消费服务,以及如何进行服务的治理,如负载均衡、熔断、降级等策略的配置。 此外,`d01373f082025aaf111c708cfbedab64034f1a4e.jpg`可能是与...

    dubbo实战视频教程

    dubbo实战视频教程

    Dubbo入门_实战

    ### Dubbo入门实战详解 #### 一、Dubbo概述与应用场景 ##### 1.1 什么是Dubbo? Dubbo是一款由阿里巴巴开发的分布式服务框架,它致力于提供高性能和透明化的RPC远程服务调用方案。该框架是阿里巴巴SOA服务化治理...

    dubbo快速启动案例

    **Dubbo快速启动案例** ...以上就是基于阿里巴巴Dubbo框架快速启动服务端和消费端的基本步骤,通过这个案例,你可以了解Dubbo的核心功能和基本使用方式。在实际开发中,还需要结合具体业务场景进行更深入的配置和优化。

    Dubbo分布式系统架构实战视频教程

    文件是网盘链接地址,2018.7.4上传,链接一直可用 本套视频为dubbo分布式系统架构实战教学视频

    dubbo官方配置指南.doc

    dubbo 官方配置指南 dubbo 官方配置指南是 dubbo 框架的核心组件之一,用于配置 dubbo 服务的各种参数。该指南涵盖了 dubbo 服务的配置关系、配置 override、配置类型等多方面的内容。 Configuration Reference ...

    dubbo安装配置说明

    【Dubbo安装配置详解】 Dubbo是一款高性能、轻量级的Java开源服务框架,由阿里巴巴公司开发并维护,主要用于实现微服务之间的远程调用。它提供了服务治理、监控和服务发现等功能,是分布式系统架构中的重要组件。在...

    dubbo视频教程|基于Dubbo的分布式系统架构实战

    久经阿里巴巴电商平台的大规模复杂业务的高并发考验,到目前为止Dubbo仍然是开源界中体系最完善的服务化治理框架,因此Dubbo被国内大量的的互联网公司和专统企业使用,国内使用Dubbo的企业有:阿里巴巴、京东、当当...

    Dubbo监控系统配置

    #### 三、Dubbo监控系统的配置与使用 ##### 3.1 配置Dubbo Admin Dubbo Admin的配置主要涉及以下几个方面: 1. **服务注册中心**:Dubbo Admin需要连接到服务注册中心(如Zookeeper)来获取服务列表。这些配置...

    dubbo官方配置指南

    Dubbo 是一款高性能、轻量级的开源 Java RPC 框架,它的配置指南对于初学者和入门者来说是理解其工作原理的关键。本指南主要介绍 Dubbo 的配置元素及其在服务发现、治理和性能调优中的作用。 首先,我们要了解的是...

    dubbo——dubbo.properties 配置1

    在使用 Dubbo 进行服务开发时,配置管理是至关重要的,它允许我们定制服务的行为和服务之间的交互。在本文中,我们将详细探讨 Dubbo 的配置体系,特别是 `dubbo.properties` 文件的配置。 首先,Dubbo 支持多层级的...

    Dubbo 入门实战1

    【Dubbo 入门实战1】Dubbo 是一款高性能、轻量级的开源Java RPC框架,主要用于解决微服务架构中的服务治理问题。在互联网发展的早期,单一应用架构可以满足需求,但随着流量增长,垂直应用架构逐渐无法应对,于是...

    dubbo微服务实战-博客系统源码

    在本项目中,"dubbo微服务实战-博客系统源码"是一个涵盖了多个技术栈的实战项目,旨在帮助开发者理解并掌握如何构建基于Dubbo和Zookeeper的微服务架构,并结合Spring与Redis Sentinel来实现高可用的缓存系统。...

Global site tag (gtag.js) - Google Analytics