supports(){
+ return idAlgorithmRegister.supportAlgorithms();
+ }
+}
diff --git a/src/main/java/com/kx/utils/id/impl/LocalUuidGenerator.java b/src/main/java/com/kx/utils/id/impl/LocalUuidGenerator.java
new file mode 100644
index 0000000000000000000000000000000000000000..041bc32496b45bf28aba9b2c7e30dab61e46f36e
--- /dev/null
+++ b/src/main/java/com/kx/utils/id/impl/LocalUuidGenerator.java
@@ -0,0 +1,25 @@
+package com.kx.utils.id.impl;
+
+import com.kx.utils.id.IdGenerator;
+import org.springframework.stereotype.Component;
+
+import java.util.UUID;
+
+/**
+ * 本地机器uuid id 生成器
+ * @author kongxiang
+ */
+@Component
+public class LocalUuidGenerator implements IdGenerator {
+
+
+ @Override
+ public String generate() {
+ return UUID.randomUUID().toString().replace("-","");
+ }
+
+ @Override
+ public String getAlgorithm() {
+ return "uuid";
+ }
+}
diff --git a/src/main/java/com/kx/utils/idempotent/annotation/Idempotent.java b/src/main/java/com/kx/utils/idempotent/annotation/Idempotent.java
new file mode 100644
index 0000000000000000000000000000000000000000..975fc30df747df9c03837b7cc4b086e945cb5275
--- /dev/null
+++ b/src/main/java/com/kx/utils/idempotent/annotation/Idempotent.java
@@ -0,0 +1,13 @@
+package com.kx.utils.idempotent.annotation;
+
+/**
+ * 幂等注解
+ *
+ */
+public @interface Idempotent {
+
+ String value() default "";
+
+
+
+}
diff --git a/src/main/java/com/kx/utils/idempotent/impl/AntiDuplicateTokenHandler.java b/src/main/java/com/kx/utils/idempotent/impl/AntiDuplicateTokenHandler.java
new file mode 100644
index 0000000000000000000000000000000000000000..2d9aa1dbdb04a0a8af08112a03f6a7b0a0b4b2c1
--- /dev/null
+++ b/src/main/java/com/kx/utils/idempotent/impl/AntiDuplicateTokenHandler.java
@@ -0,0 +1,28 @@
+package com.kx.utils.idempotent.impl;
+
+
+import org.springframework.stereotype.Component;
+
+/**
+ * 接口幂等性方案: 防重token令牌实现幂等性
+ *
+ *
+ * 针对客户端连续点击或者调用方的超时重试等情况,例如提交订单,此种操作就可以用 Token 的机制实现防止重复提交。
+ * 简单的说就是调用方在调用接口的时候先向后端请求一个全局 ID(Token),请求的时候携带这个全局 ID 一起请求(Token 最好将其放到 Headers 中),后端需要对这个 Token 作为 Key,用户信息作为 Value 到 Redis 中进行键值内容校验,如果 Key 存在且 Value 匹配就执行删除命令,然后正常执行后面的业务逻辑。如果不存在对应的 Key 或 Value 不匹配就返回重复执行的错误信息,这样来保证幂等操作。
+ *
+ *
+ * 使用操作:
+ * 插入操作
+ * 更新操作
+ * 删除操作
+ *
+ *
+ * @author kongxiang
+ */
+@Component
+public class AntiDuplicateTokenHandler {
+
+
+
+
+}
diff --git a/src/main/java/com/kx/utils/token/Token.java b/src/main/java/com/kx/utils/token/Token.java
new file mode 100644
index 0000000000000000000000000000000000000000..35ba5441a755a1020df827e18434ea0b66d3e358
--- /dev/null
+++ b/src/main/java/com/kx/utils/token/Token.java
@@ -0,0 +1,36 @@
+package com.kx.utils.token;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Token 令牌
+ * 领域对象
+ * @author kongxiang
+ */
+@Data
+public class Token {
+
+ /**
+ * token 值
+ */
+ private String value;
+ /**
+ * token生成时间
+ */
+ private Date createTime;
+ /**
+ * token过期时间
+ */
+ private Long expireMillSecond;
+
+ /**
+ * 是否过期
+ * @return
+ */
+ public boolean isExpire(){
+ return System.currentTimeMillis() - expireMillSecond > createTime.getTime();
+ }
+
+}
diff --git a/src/main/java/com/kx/utils/token/TokenGenerator.java b/src/main/java/com/kx/utils/token/TokenGenerator.java
new file mode 100644
index 0000000000000000000000000000000000000000..f5364d99c358f27e46f602d85c4256bbbb063eac
--- /dev/null
+++ b/src/main/java/com/kx/utils/token/TokenGenerator.java
@@ -0,0 +1,10 @@
+package com.kx.utils.token;
+
+/**
+ * @author kongxiang
+ */
+public interface TokenGenerator {
+
+
+
+}
diff --git a/src/main/resources/META-INF/spring.factories b/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000000000000000000000000000000000000..eb32f931972f795890d317d97ad793c85a5a9834
--- /dev/null
+++ b/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,4 @@
+
+# Auto config
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+ com.kx.config.IdAutoConfiguration
\ No newline at end of file
diff --git a/src/test/java/com/kx/test/IdTest.java b/src/test/java/com/kx/test/IdTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..9aa1daa880cd811c78de659bfcebd1fee10a8570
--- /dev/null
+++ b/src/test/java/com/kx/test/IdTest.java
@@ -0,0 +1,16 @@
+package com.kx.test;
+
+import org.junit.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+public class IdTest {
+
+
+
+
+ @Test
+ public void IdGen(){
+
+ }
+}