💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
只需要在当前Controller的操作方法上,引用@RedissonLock注解即可; 注意:@RedissonLock注解携带有默认参数,同时也可以自定义参数内容, 如:@RedissonLock(lockType= LockTypeEnum.ReentryLock, waitTime= 35L, leaseTime = 25L) ***** 具体如下: ``` /** * 系统应用-新增 */ @PostMapping("/add") @RedissonLock public MyResult add(@RequestBody SystemAppEntity systemApp) { systemAppService.add(systemApp); return MyResult.success(); } /** * 系统应用-新增 */ @PostMapping("/add") @RedissonLock(lockType= LockTypeEnum.ReentryLock, waitTime= 35L, leaseTime = 25L) public MyResult add(@RequestBody SystemAppEntity systemApp) { systemAppService.add(systemApp); return MyResult.success(); }