Unverified 提交 76f1f2fb authored 作者: 许雪里's avatar 许雪里 提交者: GitHub

Merge pull request #480 from uliian/master

添加配置参数校验
......@@ -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");
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论