记录在学习springcloud过程中,在springboot2.0环境下实现,所遇到的坑和感悟。
学习的教程:
史上最简单的SpringCloud教程 | 第三篇: 服务消费者(Feign)
一.修改pom配置
- springboot版本为,2.0.6.RELEASE:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
- 关键依赖的导入修改为:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
- dependencyManagement修改为:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
本文记录了在SpringBoot 2.0环境下使用SpringCloud Feign作为服务消费者的实战经验,详细介绍了如何修改pom配置,包括关键依赖的导入和dependencyManagement的设置,分享了在学习过程中的遇到的问题及解决方法。
449

被折叠的 条评论
为什么被折叠?



