Skip to content

Commit 43d8ff7

Browse files
committed
chore: add prettier config
1 parent 0d29af9 commit 43d8ff7

9 files changed

+3114
-221
lines changed

.docsifytopdfrc.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
2-
contents: ["summary.md"],
3-
pathToPublic: "pdf/advanced-java.pdf",
4-
pdfOptions: "<options for puppeteer.pdf()>",
5-
removeTemp: true,
6-
emulateMedia: "screen",
2+
contents: ['summary.md'],
3+
pathToPublic: 'pdf/advanced-java.pdf',
4+
pdfOptions: '<options for puppeteer.pdf()>',
5+
removeTemp: true,
6+
emulateMedia: 'screen',
77
};

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ yarn-debug.log*
2525
yarn-error.log*
2626

2727
dist
28-
package-lock.json
2928
lib
3029

3130
node_modules

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea/
2+
.github/
3+
node_modules/

.prettierrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
"bracketSpacing": true,
88
"jsxBracketSameLine": false,
99
"arrowParens": "avoid"
10-
}
10+
}

docs/high-concurrency/how-to-limit-current.md

+44-44
Original file line numberDiff line numberDiff line change
@@ -288,25 +288,25 @@ public class TokenBucket {
288288

289289
```yaml
290290
spring:
291-
cloud:
292-
gateway:
293-
routes:
294-
- id: requestratelimiter_route
295-
296-
uri: lb://pigx-upms
297-
order: 10000
298-
predicates:
299-
- Path=/admin/**
300-
301-
filters:
302-
- name: RequestRateLimiter
303-
304-
args:
305-
redis-rate-limiter.replenishRate: 1 # 令牌桶的容积
306-
redis-rate-limiter.burstCapacity: 3 # 流速 每秒
307-
key-resolver: '#{@remoteAddrKeyResolver}' #SPEL表达式去的对应的bean
308-
309-
- StripPrefix=1
291+
cloud:
292+
gateway:
293+
routes:
294+
- id: requestratelimiter_route
295+
296+
uri: lb://pigx-upms
297+
order: 10000
298+
predicates:
299+
- Path=/admin/**
300+
301+
filters:
302+
- name: RequestRateLimiter
303+
304+
args:
305+
redis-rate-limiter.replenishRate: 1 # 令牌桶的容积
306+
redis-rate-limiter.burstCapacity: 3 # 流速 每秒
307+
key-resolver: '#{@remoteAddrKeyResolver}' #SPEL表达式去的对应的bean
308+
309+
- StripPrefix=1
310310
```
311311
312312
```java
@@ -329,37 +329,37 @@ KeyResolver remoteAddrKeyResolver() {
329329

330330
```yaml
331331
spring:
332-
cloud:
333-
nacos:
334-
discovery:
335-
server-addr: localhost:8848
336-
sentinel:
337-
transport:
338-
dashboard: localhost:8080
339-
port: 8720
340-
datasource:
341-
ds:
342-
nacos:
343-
server-addr: localhost:8848
344-
dataId: spring-cloud-sentinel-nacos
345-
groupId: DEFAULT_GROUP
346-
rule-type: flow
347-
namespace: xxxxxxxx
332+
cloud:
333+
nacos:
334+
discovery:
335+
server-addr: localhost:8848
336+
sentinel:
337+
transport:
338+
dashboard: localhost:8080
339+
port: 8720
340+
datasource:
341+
ds:
342+
nacos:
343+
server-addr: localhost:8848
344+
dataId: spring-cloud-sentinel-nacos
345+
groupId: DEFAULT_GROUP
346+
rule-type: flow
347+
namespace: xxxxxxxx
348348
```
349349
350350
- 配置内容在 nacos 上进行编辑
351351
352352
```json
353353
[
354-
{
355-
"resource": "/hello",
356-
"limitApp": "default",
357-
"grade": 1,
358-
"count": 1,
359-
"strategy": 0,
360-
"controlBehavior": 0,
361-
"clusterMode": false
362-
}
354+
{
355+
"resource": "/hello",
356+
"limitApp": "default",
357+
"grade": 1,
358+
"count": 1,
359+
"strategy": 0,
360+
"controlBehavior": 0,
361+
"clusterMode": false
362+
}
363363
]
364364
```
365365

0 commit comments

Comments
 (0)