mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 04:39:00 +08:00
幂等缓存key支持租户
This commit is contained in:
1 parent
7de2815c8c
commit
dba50d9fb5
2 files changed
+9
No files matched your search
@@ -18,6 +18,10 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.pig4cloud</groupId>
|
||||
<artifactId>pigx-common-core</artifactId>
|
||||
</dependency>
|
||||
<!--aop-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package com.pig4cloud.pigx.common.idempotent.aspect;
|
||||
|
||||
import com.pig4cloud.pigx.common.core.util.KeyStrResolver;
|
||||
import com.pig4cloud.pigx.common.idempotent.annotation.Idempotent;
|
||||
import com.pig4cloud.pigx.common.idempotent.exception.IdempotentException;
|
||||
import com.pig4cloud.pigx.common.idempotent.expression.KeyResolver;
|
||||
@@ -51,6 +52,9 @@ public class IdempotentAspect {
|
||||
@Autowired
|
||||
private KeyResolver keyResolver;
|
||||
|
||||
@Autowired
|
||||
private KeyStrResolver keyStrResolver;
|
||||
|
||||
@Pointcut("@annotation(com.pig4cloud.pigx.common.idempotent.annotation.Idempotent)")
|
||||
public void pointCut() {
|
||||
}
|
||||
@@ -80,6 +84,7 @@ public class IdempotentAspect {
|
||||
// 使用jstl 规则区分
|
||||
key = keyResolver.resolver(idempotent, joinPoint);
|
||||
}
|
||||
key = keyStrResolver.extract(key,":");
|
||||
|
||||
long expireTime = idempotent.expireTime();
|
||||
String info = idempotent.info();
|
||||
|
||||
Reference in new issue
Block a user