1.创建父工程
pom文件如下(这里只添加几个最简单的依赖)
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5 4.0.0
6
7 wyb
8 springbootDubbo
9 pom
10 1.0-SNAPSHOT
11
12 api
13 provider
14 consumer
15
16
17
18
19 org.springframework.boot
20 spring-boot-starter-parent
21 1.5.1.RELEASE
22
23
24
25 1.0.0
26
27
28
29
30
31
32 io.dubbo.springboot
33 spring-boot-starter-dubbo
34 ${dubbo-spring-boot}
35
36
37
38
39 org.springframework.boot
40 spring-boot-starter-web
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
2.创建子工程api工程(主要是写一些实体和接口)
pom文件如下
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
6 springbootDubbo
7 wyb
8 1.0-SNAPSHOT
9
10 4.0.0
11
12 api
13
14
15 org.hibernate.javax.persistence
16 hibernate-jpa-2.1-api
17 1.0.0.Final
18
19
20 org.hibernate.ja