個客戶端。
服務端
服務端maven父工程
首先搭建一個maven父工程,引入dubbo和spring的依賴,dubbo能夠和spring無縫集成。
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <v.dubbo.ext>1.3.0-SNAPSHOT</v.dubbo.ext>
- <v.spring>3.1.2.RELEASE</v.spring>
- <v.plugin.jar>2.3.1</v.plugin.jar>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.jd.dubbo.ext</groupId>
- <artifactId>dubbo-ext-spi</artifactId>
- <version>${v.dubbo.ext}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>${v.spring}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>${v.spring}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${v.spring}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context-support</artifactId>
- <version>${v.spring}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-tx</artifactId>
- <version>${v.spring}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-orm</artifactId>
- <version>${v.spring}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>${v.spring}</version>
- </dependency>
- </dependencies>
這些都是開發dubbo服務端必需要用的依賴包。