|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" |
| 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 | + <parent> |
| 6 | + <artifactId>labx-23-scn-hystrix-dubbo-demo</artifactId> |
| 7 | + <groupId>cn.iocoder.springboot.labs</groupId> |
| 8 | + <version>1.0-SNAPSHOT</version> |
| 9 | + </parent> |
| 10 | + <modelVersion>4.0.0</modelVersion> |
| 11 | + |
| 12 | + <artifactId>labx-23-scn-hystrix-dubbo-demo-application</artifactId> |
| 13 | + |
| 14 | + <properties> |
| 15 | + <maven.compiler.target>1.8</maven.compiler.target> |
| 16 | + <maven.compiler.source>1.8</maven.compiler.source> |
| 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 | + </properties> |
| 21 | + |
| 22 | + <!-- |
| 23 | + 引入 Spring Boot、Spring Cloud、Spring Cloud Alibaba 三者 BOM 文件,进行依赖版本的管理,防止不兼容。 |
| 24 | + 在 https://dwz.cn/mcLIfNKt 文章中,Spring Cloud Alibaba 开发团队推荐了三者的依赖关系 |
| 25 | + --> |
| 26 | + <dependencyManagement> |
| 27 | + <dependencies> |
| 28 | + <dependency> |
| 29 | + <groupId>org.springframework.boot</groupId> |
| 30 | + <artifactId>spring-boot-starter-parent</artifactId> |
| 31 | + <version>${spring.boot.version}</version> |
| 32 | + <type>pom</type> |
| 33 | + <scope>import</scope> |
| 34 | + </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 | + </dependencies> |
| 50 | + </dependencyManagement> |
| 51 | + |
| 52 | + <dependencies> |
| 53 | + <!-- 引入用户服务 API 包 --> |
| 54 | + <dependency> |
| 55 | + <groupId>cn.iocoder.springboot.labs</groupId> |
| 56 | + <artifactId>labx-23-scn-hystrix-dubbo-demo-user-service-api</artifactId> |
| 57 | + <version>1.0-SNAPSHOT</version> |
| 58 | + </dependency> |
| 59 | + |
| 60 | + <!-- 引入 SpringMVC 相关依赖,并实现对其的自动配置 --> |
| 61 | + <dependency> |
| 62 | + <groupId>org.springframework.boot</groupId> |
| 63 | + <artifactId>spring-boot-starter-web</artifactId> |
| 64 | + </dependency> |
| 65 | + |
| 66 | + <!-- 引入 Spring Cloud Alibaba Nacos Discovery 相关依赖,将 Nacos 作为注册中心,并实现对其的自动配置 --> |
| 67 | + <dependency> |
| 68 | + <groupId>com.alibaba.cloud</groupId> |
| 69 | + <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> |
| 70 | + </dependency> |
| 71 | + |
| 72 | + <!-- 引入 Spring Cloud Alibaba Dubbo 相关依赖,实现呢 Dubbo 进行远程调用,并实现对其的自动配置 --> |
| 73 | + <dependency> |
| 74 | + <groupId>com.alibaba.cloud</groupId> |
| 75 | + <artifactId>spring-cloud-starter-dubbo</artifactId> |
| 76 | + </dependency> |
| 77 | + |
| 78 | + <!-- 引入 Spring Cloud Netflix Hystrix 相关依赖,将 Hystrix 作为服务保障组件,并实现对其的自动配置 --> |
| 79 | + <dependency> |
| 80 | + <groupId>org.springframework.cloud</groupId> |
| 81 | + <artifactId>spring-cloud-starter-netflix-hystrix</artifactId> |
| 82 | + </dependency> |
| 83 | + </dependencies> |
| 84 | + |
| 85 | +</project> |
0 commit comments