Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

高级用法的接口限流无效 #16

Open
luchangtx opened this issue Aug 12, 2024 · 0 comments
Open

高级用法的接口限流无效 #16

luchangtx opened this issue Aug 12, 2024 · 0 comments

Comments

@luchangtx
Copy link

Enviroment

JDK Version: 11

SpringBoot Version: 2.3.3.RELEASE

DynamicDatasourceStarter Version:

Describe

按照文档里的高级用法:6 指定时间内不释放锁(限流)
@GetMapping("test") @Lock4j(keys = "#userId", expire = 5000, acquireTimeout = 0, autoRelease = false) public String publish(@RequestParam String userId) { return "success"; }
想实现接口防抖的功能,但是因redisson的锁是可重入的,导致如果多次请求分配到的是同一个线程的话,都会获取到锁,并不能实现像文档介绍的限流效果

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant