技术选型及Spring Cloud介绍

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/shenzhen_zsw/article/details/89410757

目录

技术选型及Spring Cloud介绍

目标

技术选型的三要素

微服务技术选型

Spring Cloud 介绍

Spring Cloud的引入


技术选型及Spring Cloud介绍

目标

    1)微服务的技术选型;

    2)搭建开发具备服务注册发现、客户端负载均衡、服务间通信的微服务架构;

    3)使用SpringCloud Eureka、SpringCloud Ribbon、RestTemplate等组件完成开发;

    4)掌握SpringCloud Eureka、SpringCloud Ribbon、RestTemplate的基本原理;

    5)能够进行微服务的架构设计;

    6)开发微服务代码脚手架;

技术选型的三要素

    1)保持技术面的广度和深度;

    2)把握和分析技术选项的优缺点;

    3)紧密结合项目和团队的情况;

微服务技术选型

Spring Cloud 介绍

Spring Cloud的引入

   <dependencyManagement>
		<dependencies>
			<dependency>
				<!-- Import dependency management from Spring Boot -->
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>1.4.7.RELEASE</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dependencies</artifactId>
				<version>Camden.SR7</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

说明:

   1)我们一贯习惯以import的方式来导入sb和spring cloud,所以我们这里改变引入方式;

   2)将parent删除然后将sb import进来好了,一个拥有spring cloud的sping boot工程就创建好了;

   3)那么引入spring cloud dependencies有什么好处呢,和spring boot dependencies一样,为我们进行版本管理;

    4)这里版本管理是组件的版本,它可以提供给我们一套兼容的组件;而无需我们关心版本也不用在pom中输入版本,比如我们这里的Eureka为例,我们无需输入版本号;

猜你喜欢

转载自blog.csdn.net/shenzhen_zsw/article/details/89410757