|
| 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-28</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-28-sc-consul-config-demo</artifactId> |
| 13 | + |
| 14 | + <properties> |
| 15 | + <spring.boot.version>2.2.4.RELEASE</spring.boot.version> |
| 16 | + <spring.cloud.version>Hoxton.SR1</spring.cloud.version> |
| 17 | + </properties> |
| 18 | + |
| 19 | + <!-- |
| 20 | + 引入 Spring Boot、Spring Cloud、Spring Cloud Alibaba 三者 BOM 文件,进行依赖版本的管理,防止不兼容。 |
| 21 | + 在 https://dwz.cn/mcLIfNKt 文章中,Spring Cloud Alibaba 开发团队推荐了三者的依赖关系 |
| 22 | + --> |
| 23 | + <dependencyManagement> |
| 24 | + <dependencies> |
| 25 | + <dependency> |
| 26 | + <groupId>org.springframework.boot</groupId> |
| 27 | + <artifactId>spring-boot-starter-parent</artifactId> |
| 28 | + <version>${spring.boot.version}</version> |
| 29 | + <type>pom</type> |
| 30 | + <scope>import</scope> |
| 31 | + </dependency> |
| 32 | + <dependency> |
| 33 | + <groupId>org.springframework.cloud</groupId> |
| 34 | + <artifactId>spring-cloud-dependencies</artifactId> |
| 35 | + <version>${spring.cloud.version}</version> |
| 36 | + <type>pom</type> |
| 37 | + <scope>import</scope> |
| 38 | + </dependency> |
| 39 | + </dependencies> |
| 40 | + </dependencyManagement> |
| 41 | + |
| 42 | + <dependencies> |
| 43 | + <!-- 引入 SpringMVC 相关依赖,并实现对其的自动配置 --> |
| 44 | + <dependency> |
| 45 | + <groupId>org.springframework.boot</groupId> |
| 46 | + <artifactId>spring-boot-starter-web</artifactId> |
| 47 | + </dependency> |
| 48 | + |
| 49 | + <!-- 引入 Spring Cloud Consul Config 相关依赖,将 Consul 作为配置中心,并实现对其的自动配置 --> |
| 50 | + <dependency> |
| 51 | + <groupId>org.springframework.cloud</groupId> |
| 52 | + <artifactId>spring-cloud-starter-consul-config</artifactId> |
| 53 | + </dependency> |
| 54 | + </dependencies> |
| 55 | + |
| 56 | +</project> |
0 commit comments