You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
2 years ago | |
|---|---|---|
| .. | ||
| src/main | 2 years ago | |
| .gitignore | 2 years ago | |
| README.md | 2 years ago | |
| pom.xml | 2 years ago | |
README.md
demo-request-scope
《基于ThreadLocal实现一个上下文管理组件》技术博客对应源码
https://juejin.cn/post/7153287656624324638
本文基于ThreadLocal原理,实现了一个上下文状态管理组件Scope,通过开启一个自定义的Scope,在Scope范围内,可以通过Scope各个方法读写数据;
通过自定义线程池实现上下文状态数据的线程间传递;
提出了一种基于Filter和Scope的Request粒度的上下文管理方案。