摘要: Redis分布式锁 1、锁场景 需要对同一共享资源进行写操作 对资源的访问是互斥的 任务通过竞争获取锁才能才能对该资源进行操作(竞争锁) 当有一个任务对资源进行操作时(占有锁) 其他任务不能对该资源进行操作(任务阻塞) 直到该任务操作结束(释放锁) 竞争锁 占有锁 任务阻塞 释放锁 graph LR 阅读全文
posted @ 2019-06-16 00:23 zuier~ 阅读(341) 评论(0) 推荐(0) 编辑
摘要: client_credentials 1、创建应用资源 2、配置认证服务器 3、配置资源访问控制 4、验证 1、启动应用,访问资源: 2、获取token 3、携带token访问资源 resource owner password credentials 密码模式需要配置 和`Authenticati 阅读全文
posted @ 2019-05-06 17:36 zuier~ 阅读(7936) 评论(0) 推荐(0) 编辑
摘要: spring security oauth2 客户端四种授权模式: 授权码模式(authorization code): 第三方应用先申请一个授权码,然后再用该码获取令牌。 简化模式(implicit) 密码模式(resource owner password credentials) 客户端模式( 阅读全文
posted @ 2019-04-30 11:14 zuier~ 阅读(2296) 评论(0) 推荐(0) 编辑
摘要: Spring Cloud Gateway is built upon "Spring Boot 2.0" , "Spring WebFlux" , and "Project Reactor" . As a consequence many of the familiar synchronous li 阅读全文
posted @ 2019-04-26 20:43 zuier~ 阅读(3609) 评论(0) 推荐(0) 编辑
摘要: 较低级别的服务中的服务故障可能导致级联故障一直到用户。 当对特定服务的调用超过circuitBreaker.requestVolumeThreshold(默认值:20个请求)且失败百分比大于circuit.rolllingStats.timeInMilliseconds定义的滚动窗口中的circui 阅读全文
posted @ 2019-04-25 14:02 zuier~ 阅读(2793) 评论(0) 推荐(0) 编辑
摘要: 服务生产,消费,调用 阅读全文
posted @ 2019-04-23 16:18 zuier~ 阅读(952) 评论(0) 推荐(0) 编辑
摘要: java.lang.String com.zuizui.cloud.feign.feign.ProviderClient.port() to {[/api/v1/provider/port],methods=[GET]}: There is already 'providerClient.ProviderClientFallback' bean method 阅读全文
posted @ 2019-04-23 14:49 zuier~ 阅读(1130) 评论(0) 推荐(0) 编辑
摘要: RabbitMQ 1、RabbitMQ环境:略 2、每个服务都添加依赖,或者聚合工程中统一添加 org.springframework.boot spring boot starter actuator org.springframework.cloud spring cloud starter b 阅读全文
posted @ 2019-04-22 18:54 zuier~ 阅读(388) 评论(0) 推荐(0) 编辑
摘要: setup a "Config Server" and then build a client that consumes the configuration on startup and then refreshes the configuration without restarting the 阅读全文
posted @ 2019-04-22 16:18 zuier~ 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 概要 You’ll setup a "Netflix Eureka service registry" and then build a client that both registers itself with the registry and uses it to resolve its ow 阅读全文
posted @ 2019-04-22 10:48 zuier~ 阅读(631) 评论(0) 推荐(0) 编辑