diff --git a/spel-validator-test/pom.xml b/spel-validator-test/pom.xml
new file mode 100644
index 0000000..9d06652
--- /dev/null
+++ b/spel-validator-test/pom.xml
@@ -0,0 +1,64 @@
+
+
+ 4.0.0
+
+ cn.sticki
+ spel-validator-root
+ 0.4.0-beta
+
+
+ spel-validator-test
+
+
+
+ cn.sticki
+ spel-validator-core
+
+
+
+
+ org.junit.jupiter
+ junit-jupiter
+ test
+
+
+
+ org.glassfish
+ javax.el
+ test
+
+
+
+ ch.qos.logback
+ logback-classic
+ test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spel-validator-javax/src/test/java/cn/sticki/spel/validator/javax/util/ValidateUtil.java b/spel-validator-test/src/main/java/cn/sticki/spel/validator/test/util/AbstractSpelValidator.java
similarity index 67%
rename from spel-validator-javax/src/test/java/cn/sticki/spel/validator/javax/util/ValidateUtil.java
rename to spel-validator-test/src/main/java/cn/sticki/spel/validator/test/util/AbstractSpelValidator.java
index 8d38ed1..f12b926 100644
--- a/spel-validator-javax/src/test/java/cn/sticki/spel/validator/javax/util/ValidateUtil.java
+++ b/spel-validator-test/src/main/java/cn/sticki/spel/validator/test/util/AbstractSpelValidator.java
@@ -1,65 +1,37 @@
-package cn.sticki.spel.validator.javax.util;
+package cn.sticki.spel.validator.test.util;
-import cn.sticki.spel.validator.core.SpelValidExecutor;
import cn.sticki.spel.validator.core.result.FieldError;
import cn.sticki.spel.validator.core.result.ObjectValidResult;
-import cn.sticki.spel.validator.javax.SpelValid;
import lombok.extern.slf4j.Slf4j;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
import java.util.Collection;
import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
/**
- * 测试验证工具类
+ * 测试验证工具抽象类
*
* @author 阿杆
* @version 1.0
* @since 2024/6/13
*/
@Slf4j
-public class ValidateUtil {
-
- @SuppressWarnings("resource")
- private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
+public abstract class AbstractSpelValidator {
/**
* 参数校验
*
* 调用此方法会触发约束校验
*
+ * @param obj 待验证对象
+ * @param spelGroups spel 分组参数
* @return 校验结果
*/
- public static ObjectValidResult validate(Object obj, String[] spelGroups) {
- // 如果对象没有使用 SpelValid 注解,则直接调用验证执行器进行验证
- // 这种情况下,只会验证本框架提供的约束注解
- if (!obj.getClass().isAnnotationPresent(SpelValid.class)) {
- return SpelValidExecutor.validateObject(obj, spelGroups);
- }
-
- // 通过 @Valid 的方式进行验证
- Set> validate = validator.validate(obj);
- if (validate == null || validate.isEmpty()) {
- return ObjectValidResult.EMPTY;
- }
- ObjectValidResult validResult = new ObjectValidResult();
- List list = validate.stream().map(ValidateUtil::convert).collect(Collectors.toList());
- validResult.addFieldError(list);
- return validResult;
- }
-
- private static FieldError convert(ConstraintViolation