From e87a22b5abf657ab48ab134b229f6e71d4bc8c2c Mon Sep 17 00:00:00 2001
From: Lin-XCC <754310653@QQ.COM>
Date: Tue, 7 Jul 2020 11:32:52 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dcommon=E6=A8=A1=E5=9D=97?=
=?UTF-8?q?=E5=B7=A5=E5=85=B7=E7=B1=BB=E7=9A=84=E6=8A=A5=E9=94=99=E3=80=82?=
=?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E5=90=AF=E5=8A=A8=E6=97=B6=E7=9A=84?=
=?UTF-8?q?=E6=A1=86=E6=9E=B6=E4=BF=A1=E6=81=AF=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/jarRepositories.xml | 5 +++++
module-common/pom.xml | 5 +++++
.../java/io/renren/common/validator/ValidatorUtils.java | 6 +++---
module-core/src/main/resources/application.yml | 2 +-
module-core/src/main/resources/banner.txt | 2 +-
5 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index 779e80a..c1daada 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -16,6 +16,11 @@
+
+
+
+
+
diff --git a/module-common/pom.xml b/module-common/pom.xml
index 2042e6f..c4bac58 100644
--- a/module-common/pom.xml
+++ b/module-common/pom.xml
@@ -13,6 +13,11 @@
jar
1.0-SNAPSHOT
+
+ org.hibernate
+ hibernate-validator
+ 5.1.1.Final
+
commons-lang
commons-lang
diff --git a/module-common/src/main/java/io/renren/common/validator/ValidatorUtils.java b/module-common/src/main/java/io/renren/common/validator/ValidatorUtils.java
index 05d31e1..1436278 100644
--- a/module-common/src/main/java/io/renren/common/validator/ValidatorUtils.java
+++ b/module-common/src/main/java/io/renren/common/validator/ValidatorUtils.java
@@ -25,9 +25,6 @@ import java.util.Set;
public class ValidatorUtils {
private static Validator validator;
- static {
- validator = Validation.buildDefaultValidatorFactory().getValidator();
- }
/**
* 校验对象
@@ -37,6 +34,9 @@ public class ValidatorUtils {
*/
public static void validateEntity(Object object, Class>... groups)
throws RRException {
+ if (validator == null) {
+ validator = Validation.buildDefaultValidatorFactory().getValidator();
+ }
Set> constraintViolations = validator.validate(object, groups);
if (!constraintViolations.isEmpty()) {
StringBuilder msg = new StringBuilder();
diff --git a/module-core/src/main/resources/application.yml b/module-core/src/main/resources/application.yml
index 20ee55d..6d1afe8 100644
--- a/module-core/src/main/resources/application.yml
+++ b/module-core/src/main/resources/application.yml
@@ -70,7 +70,7 @@ renren:
# APP模块,是通过jwt认证的,如果要使用APP模块,则需要修改【加密秘钥】
jwt:
# 加密秘钥
- secret: f4e2e52034348f86b67cde581c0f9eb5[www.renren.io]
+ secret: f4e2e52034348f86b67cde581c0f9eb5
# token有效时长,7天,单位秒
expire: 604800
header: token
\ No newline at end of file
diff --git a/module-core/src/main/resources/banner.txt b/module-core/src/main/resources/banner.txt
index ec3d43f..a8fb93e 100644
--- a/module-core/src/main/resources/banner.txt
+++ b/module-core/src/main/resources/banner.txt
@@ -1,5 +1,5 @@
====================================================================================================================
- 欢迎使用 renren-fast 人人快速开发平台 - Powered By https://www.renren.io/
+ 中建材轻工业自动化研究所有限公司产品:WCS调度管理系统
====================================================================================================================
\ No newline at end of file