From 6717d8d5900170933184527bdeab40e7875123dd Mon Sep 17 00:00:00 2001 From: "xueli.xue" Date: Fri, 20 May 2016 20:56:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E9=99=86=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/xxl/job/controller/IndexController.java | 4 +++- xxl-job-admin/src/main/resources/config.properties | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/xxl-job-admin/src/main/java/com/xxl/job/controller/IndexController.java b/xxl-job-admin/src/main/java/com/xxl/job/controller/IndexController.java index 33370856..c69ec9b1 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/controller/IndexController.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/controller/IndexController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.ResponseBody; import com.xxl.job.controller.annotation.PermessionLimit; import com.xxl.job.controller.interceptor.PermissionInterceptor; import com.xxl.job.core.model.ReturnT; +import com.xxl.job.core.util.PropertiesUtil; /** * index controller @@ -45,7 +46,8 @@ public class IndexController { public ReturnT loginDo(HttpServletRequest request, HttpServletResponse response, String userName, String password, String ifRemember){ if (!PermissionInterceptor.ifLogin(request)) { if (StringUtils.isNotBlank(userName) && StringUtils.isNotBlank(password) - && "admin".equals(userName) && "123456".equals(password)) { + && PropertiesUtil.getString("login.username").equals(userName) + && PropertiesUtil.getString("login.password").equals(password)) { boolean ifRem = false; if (StringUtils.isNotBlank(ifRemember) && "on".equals(ifRemember)) { ifRem = true; diff --git a/xxl-job-admin/src/main/resources/config.properties b/xxl-job-admin/src/main/resources/config.properties index 56968991..4988f3a4 100644 --- a/xxl-job-admin/src/main/resources/config.properties +++ b/xxl-job-admin/src/main/resources/config.properties @@ -7,4 +7,8 @@ mail.port=25 mail.username=ovono802302@163.com mail.password=asdfzxcv mail.sendFrom=ovono802302@163.com -mail.sendNick=《任务调度中心xxl-job》 \ No newline at end of file +mail.sendNick=《任务调度中心xxl-job》 + +# for login +login.username=admin +login.password=123456 \ No newline at end of file