Skip to content

Commit

Permalink
修改介绍
Browse files Browse the repository at this point in the history
  • Loading branch information
HaojunRen committed Aug 28, 2020
1 parent dbdc6d5 commit d55fa10
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2703,10 +2703,11 @@ spring.application.strategy.scan.packages=com.nepxion.discovery.guide.service.fe
```xml
-javaagent:/discovery-agent/discovery-plugin-strategy-starter-agent-{discovery.version}.jar -Dthread.scan.packages=com.abc;com.xyz -Dthread.request.decorator.enabled=true
```
- 参数说明
- /discovery-agent:Agent所在的目录,需要对应到实际的目录上
- thread.scan.packages:Runnable,Callable对象所在的扫描目录,该目录下的Runnable,Callable对象都会被装饰。该目录最好精细和准确,这样可以减少被装饰的对象数,提高性能,目录如果有多个,用“;”分隔
- thread.request.decorator.enabled:异步调用场景下在服务端的Request请求的装饰,当主线程先于子线程执行完的时候,Request会被Destory,导致Header仍旧拿不到,开启装饰,就可以确保拿到。默认为关闭,根据实践经验,大多数场景下,需要开启这个开关

参数说明
- /discovery-agent:Agent所在的目录,需要对应到实际的目录上
- thread.scan.packages:Runnable,Callable对象所在的扫描目录,该目录下的Runnable,Callable对象都会被装饰。该目录最好精细和准确,这样可以减少被装饰的对象数,提高性能,目录如果有多个,用“;”分隔
- thread.request.decorator.enabled:异步调用场景下在服务端的Request请求的装饰,当主线程先于子线程执行完的时候,Request会被Destory,导致Header仍旧拿不到,开启装饰,就可以确保拿到。默认为关闭,根据实践经验,大多数场景下,需要开启这个开关
```xml
扫描目录thread.scan.packages定义,该参数只作用于服务侧,网关侧不需要加
1. @Async场景下的扫描目录为org.springframework.aop.interceptor
Expand Down

0 comments on commit d55fa10

Please sign in to comment.