
Springcloud
CoolCST
这个作者很懒,什么都没留下…
展开
-
springcloud 微服务与网站架构演变过程
什么是微服务? 微服务(Microservice Architecture)是近几年流行的一种架构思想,关于它的概念很难一言以蔽之 究竟什么是微服务呢?我们在此引用 ThoughtWorks 公司的首席科学家 Martin Fowler 的一段话: In short, the microservice architectural style is an approach to developing...原创 2019-07-23 11:25:22 · 194 阅读 · 1 评论 -
springcloud服务的注册与发现
我们用到的是 eureka 服务注册中心,我们需要创建两个 module 1.注册中心 2.服务提供者 注册中心 完整的 pom 如下 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3...原创 2019-07-23 11:29:05 · 147 阅读 · 1 评论 -
springcloud RestTemplate实现服务的调用以及Ribbon负载均衡
springcloud 中有两种调用方式,RestTemplate、Fegin。RestTemplate 由 spring 提供,而 Fegin 是 springcloud 提供,具体来说当然 Fegin 更好用,但是今天使用 RestTemplate RestTemplate 简介 Spring’scentral class for synchronous client-side HTTP ac...原创 2019-07-23 11:34:21 · 249 阅读 · 1 评论 -
springcloud 服务消费者(Feign)
一、Feign简介 Feign 的英文表意为 “假装,伪装,变形”, 是一个http请求调用的轻量级框架,可以以接口注解的方式发起 Http 请求,而不用像 httpclient 通过封装 HTTP 请求报文的方式调用。Feign 通过处理注解,将请求模板化,当实际调用的时候,传入参数,根据参数再应用到请求上,进而转化成真正的请求,这种请求相对而言比较直观。Feign被广泛应用在Spring Cl...原创 2019-07-23 11:38:56 · 300 阅读 · 1 评论