Skip to content

Commit 6ed1cd4

Browse files
committed
docs: update readme guideline
1 parent 80cb1f2 commit 6ed1cd4

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515

1616
本项目已开通 [Discussions](https://github.com/doocs/advanced-java/discussions) 功能。学习之前,先来看看 [Discussions 讨论区](https://github.com/doocs/advanced-java/discussions/9)的技术面试官是怎么说的吧。本项目欢迎各位开发者朋友到 [Discussions 讨论区](https://github.com/doocs/advanced-java/discussions)分享自己的一些想法和实践经验。也不妨 Star 关注 [doocs/advanced-java](https://github.com/doocs/advanced-java),随时追踪项目最新动态。
1717

18-
本项目基于 [Docsify](https://docsify.js.org) 进行构建,并同步部署(这里用到 [Gitee Pages Action](https://github.com/yanglbme/gitee-pages-action) 自动部署工具,非常好用的一个开源工具,欢迎 Star 关注)在以下三个站点:
18+
本项目基于 [Docsify](https://docsify.js.org) 进行构建,并使用开源小工具 [Gitee Pages Action](https://github.com/yanglbme/gitee-pages-action) 实现站点的自动部署更新。
19+
20+
目前支持以下三个站点访问:
1921

2022
- Netlify: https://adjava.netlify.app
2123
- Gitee Pages: https://doocs.gitee.io/advanced-java

docs/high-availability/hystrix-circuit-breaker.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Hystrix 断路器有三种状态,分别是关闭(Closed)、打开(Open
77
![image-20191104211642271](./images/hystrix-circuit-breaker-state-machine.png)
88

99
1. `Closed` 断路器关闭:调用下游的请求正常通过
10-
2. `Open` 断路器打开:阻断对下游服务的调用,直接走 Fallback 逻辑
11-
3. `Half-Open` 断路器处于半开状态:[SleepWindowInMilliseconds](#circuitBreaker.sleepWindowInMilliseconds)
10+
1. `Open` 断路器打开:阻断对下游服务的调用,直接走 Fallback 逻辑
11+
1. `Half-Open` 断路器处于半开状态:[SleepWindowInMilliseconds](#circuitBreaker.sleepWindowInMilliseconds)
1212

1313
### [Enabled](https://github.com/Netflix/Hystrix/wiki/Configuration#circuitbreakerenabled)
1414

@@ -165,7 +165,7 @@ public class CircuitBreakerTest {
165165

166166
测试结果,我们可以明显看出系统断路与恢复的整个过程。
167167

168-
```c
168+
```java
169169
调用接口查询商品数据,productId=-1
170170
ProductInfo(id=null, name=降级商品, price=null, pictureList=null, specification=null, service=null, color=null, size=null, shopId=null, modifiedTime=null, cityId=null, cityName=null, brandId=null, brandName=null)
171171
// ...
@@ -186,7 +186,7 @@ ProductInfo(id=1, name=iphone7手机, price=5599.0, pictureList=a.jpg,b.jpg, spe
186186

187187
前 30 次请求,我们传入的 productId 为 -1,所以服务执行过程中会抛出异常。我们设置了最少 20 次请求通过断路器并且异常比例超出 40% 就触发断路。因此执行了 21 次接口调用,每次都抛异常并且走降级,21 次过后,断路器就被打开了。
188188

189-
之后的 9 次请求,都不会执行 run() 方法,也就不会打印以下信息。
189+
之后的 9 次请求,都不会执行 `run()` 方法,也就不会打印以下信息。
190190

191191
```c
192192
调用接口查询商品数据,productId=-1
@@ -199,4 +199,4 @@ ProductInfo(id=1, name=iphone7手机, price=5599.0, pictureList=a.jpg,b.jpg, spe
199199
### 参考内容
200200

201201
1. [Hystrix issue 1459](https://github.com/Netflix/Hystrix/issues/1459)
202-
2. [Hystrix Metrics](https://github.com/Netflix/Hystrix/wiki/Configuration#metrics)
202+
1. [Hystrix Metrics](https://github.com/Netflix/Hystrix/wiki/Configuration#metrics)

docs/high-availability/hystrix-fallback.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public class BrandCache {
6565
* 获取品牌名称的command
6666
*
6767
*/
68-
6968
public class GetBrandNameCommand extends HystrixCommand<String> {
7069

7170
private Long brandId;

0 commit comments

Comments
 (0)