springboot1.x+dubbo案例
pom文件
<dependencies>
<dependency>
<groupId>com.sbdubbo</groupId>
<artifactId>provider-interface</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.dubbo.springboot</groupId>
<artifactId>spring-boot-starter-dubbo</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.4.7</version>
</dependency>
<dependency>
<groupId>com.github.sgroschupf</groupId>
<artifactId>zkclient</artifactId>
<version>0.1</version>
</dependency>
</dependencies>
provider
## Dubbo 服务提供者配置 spring.dubbo.application.name=provider spring.dubbo.registry.address=zookeeper://192.168.25.128:2181 spring.dubbo.protocol.name=dubbo spring.dubbo.protocol.port=20881 #spring.dubbo.scan=org.spring.springboot.dubbo spring.dubbo.scan=com.sbdubbo.provider.Service
consumer
spring.dubbo.application.name=consumer spring.dubbo.registry.address=zookeeper://192.168.25.128:2181 spring.dubbo.scan=com.sbdubbo.consumer.Service