From efd55f8f76811d2f93d8f31c804c36cc6c36f172 Mon Sep 17 00:00:00 2001 From: uliian Date: Wed, 22 Aug 2018 10:43:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=85=8D=E7=BD=AE=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xxl/job/admin/core/conf/XxlJobAdminConfig.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/conf/XxlJobAdminConfig.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/conf/XxlJobAdminConfig.java index ba41d716..34b88062 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/conf/XxlJobAdminConfig.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/conf/XxlJobAdminConfig.java @@ -4,6 +4,8 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; +import javax.annotation.PostConstruct; + /** * xxl-job config * @@ -85,4 +87,14 @@ public class XxlJobAdminConfig implements InitializingBean{ return i18n; } + @PostConstruct + public void init() { + if(this.getLoginUsername().length()>18){ + throw new IllegalArgumentException("username length greater than 18"); + } + + if(this.getLoginPassword().length()>18){ + throw new IllegalArgumentException("password length greater than 18"); + } + } }