提交 6717d8d5 authored 作者: xueli.xue's avatar xueli.xue

登陆验证

上级 e1a96569
......@@ -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<String> 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;
......
......@@ -8,3 +8,7 @@ mail.username=ovono802302@163.com
mail.password=asdfzxcv
mail.sendFrom=ovono802302@163.com
mail.sendNick=《任务调度中心xxl-job》
# for login
login.username=admin
login.password=123456
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论