|
15 | 15 | <maven.compiler.target>1.8</maven.compiler.target>
|
16 | 16 | <maven.compiler.source>1.8</maven.compiler.source>
|
17 | 17 | <spring.boot.version>2.2.4.RELEASE</spring.boot.version>
|
18 |
| - <spring.cloud.version>Hoxton.SR1</spring.cloud.version> |
19 |
| - <spring.cloud.alibaba.version>2.2.0.RELEASE</spring.cloud.alibaba.version> |
20 | 18 | </properties>
|
21 | 19 |
|
22 |
| - <!-- |
23 |
| - 引入 Spring Boot、Spring Cloud、Spring Cloud Alibaba 三者 BOM 文件,进行依赖版本的管理,防止不兼容。 |
24 |
| - 在 https://dwz.cn/mcLIfNKt 文章中,Spring Cloud Alibaba 开发团队推荐了三者的依赖关系 |
25 |
| - --> |
26 | 20 | <dependencyManagement>
|
27 | 21 | <dependencies>
|
28 | 22 | <dependency>
|
|
32 | 26 | <type>pom</type>
|
33 | 27 | <scope>import</scope>
|
34 | 28 | </dependency>
|
35 |
| - <dependency> |
36 |
| - <groupId>org.springframework.cloud</groupId> |
37 |
| - <artifactId>spring-cloud-dependencies</artifactId> |
38 |
| - <version>${spring.cloud.version}</version> |
39 |
| - <type>pom</type> |
40 |
| - <scope>import</scope> |
41 |
| - </dependency> |
42 |
| - <dependency> |
43 |
| - <groupId>com.alibaba.cloud</groupId> |
44 |
| - <artifactId>spring-cloud-alibaba-dependencies</artifactId> |
45 |
| - <version>${spring.cloud.alibaba.version}</version> |
46 |
| - <type>pom</type> |
47 |
| - <scope>import</scope> |
48 |
| - </dependency> |
49 | 29 | </dependencies>
|
50 | 30 | </dependencyManagement>
|
51 | 31 |
|
|
63 | 43 | <artifactId>spring-boot-starter-web</artifactId>
|
64 | 44 | </dependency>
|
65 | 45 |
|
66 |
| - <!-- 引入 Spring Cloud Alibaba Nacos Discovery 相关依赖,将 Nacos 作为注册中心,并实现对其的自动配置 --> |
| 46 | + <!-- 实现对 Dubbo 的自动化配置 --> |
| 47 | + <dependency> |
| 48 | + <groupId>org.apache.dubbo</groupId> |
| 49 | + <artifactId>dubbo</artifactId> |
| 50 | + <version>2.7.4.1</version> |
| 51 | + </dependency> |
67 | 52 | <dependency>
|
68 |
| - <groupId>com.alibaba.cloud</groupId> |
69 |
| - <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> |
| 53 | + <groupId>org.apache.dubbo</groupId> |
| 54 | + <artifactId>dubbo-spring-boot-starter</artifactId> |
| 55 | + <version>2.7.4.1</version> |
70 | 56 | </dependency>
|
71 | 57 |
|
72 |
| - <!-- 引入 Spring Cloud Alibaba Dubbo 相关依赖,实现呢 Dubbo 进行远程调用,并实现对其的自动配置 --> |
| 58 | + <!-- 使用 Nacos 作为注册中心 --> |
73 | 59 | <dependency>
|
74 |
| - <groupId>com.alibaba.cloud</groupId> |
75 |
| - <artifactId>spring-cloud-starter-dubbo</artifactId> |
| 60 | + <groupId>com.alibaba.nacos</groupId> |
| 61 | + <artifactId>nacos-client</artifactId> |
| 62 | + <version>1.2.1</version> |
| 63 | + </dependency> |
| 64 | + <dependency> |
| 65 | + <groupId>org.apache.dubbo</groupId> |
| 66 | + <artifactId>dubbo-registry-nacos</artifactId> |
| 67 | + <version>2.7.4.1</version> |
76 | 68 | </dependency>
|
77 | 69 |
|
78 |
| - <!-- 引入 Spring Cloud Netflix Hystrix 相关依赖,将 Hystrix 作为服务保障组件,并实现对其的自动配置 --> |
| 70 | + <!-- 引入 Hystrix 依赖 --> |
| 71 | + <dependency> |
| 72 | + <groupId>com.netflix.hystrix</groupId> |
| 73 | + <artifactId>hystrix-core</artifactId> |
| 74 | + <version>1.5.18</version> |
| 75 | + </dependency> |
79 | 76 | <dependency>
|
80 |
| - <groupId>org.springframework.cloud</groupId> |
81 |
| - <artifactId>spring-cloud-starter-netflix-hystrix</artifactId> |
| 77 | + <groupId>com.netflix.hystrix</groupId> |
| 78 | + <artifactId>hystrix-javanica</artifactId> |
| 79 | + <version>1.5.18</version> |
82 | 80 | </dependency>
|
83 | 81 | </dependencies>
|
84 | 82 |
|
|
0 commit comments