From 168d49fe0b21aaf1d06512a2896959120beec312 Mon Sep 17 00:00:00 2001 From: abbfun <819589789@qq.com> Date: 星期一, 08 八月 2022 09:46:08 +0800 Subject: [PATCH] 优化表格上右侧工具条(搜索按钮显隐&右侧样式凸出) 无搜索条件时可通过search隐藏搜索按钮,工具条组右侧样式超出5px(相对于底部表格),其父节点gutter代码生成默认10,此处也默认10,使工具组样式左右一致 --- ruoyi-common/src/main/java/com/ruoyi/common/utils/ValidatorUtils.java | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ValidatorUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ValidatorUtils.java index e26e784..1fe2eaf 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ValidatorUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ValidatorUtils.java @@ -1,11 +1,11 @@ package com.ruoyi.common.utils; +import com.ruoyi.common.utils.spring.SpringUtils; import lombok.AccessLevel; import lombok.NoArgsConstructor; import javax.validation.ConstraintViolation; import javax.validation.ConstraintViolationException; -import javax.validation.Validation; import javax.validation.Validator; import java.util.Set; @@ -17,9 +17,9 @@ @NoArgsConstructor(access = AccessLevel.PRIVATE) public class ValidatorUtils { - private static final Validator VALID = Validation.buildDefaultValidatorFactory().getValidator(); + private static final Validator VALID = SpringUtils.getBean(Validator.class); - public static <T> void validate(T object, Class<?>... groups) { + public static <T> void validate(T object, Class<?>... groups) { Set<ConstraintViolation<T>> validate = VALID.validate(object, groups); if (!validate.isEmpty()) { throw new ConstraintViolationException("鍙傛暟鏍¢獙寮傚父", validate); -- Gitblit v1.9.3