mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-06 17:08:29 +08:00
Registration
This commit is contained in:
parent
ae669d2310
commit
d0659bc130
@ -83,7 +83,7 @@ public class PathUtils {
|
|||||||
System.setProperty("CLASSES_PATH", classPath);
|
System.setProperty("CLASSES_PATH", classPath);
|
||||||
|
|
||||||
_logger.trace("PathUtils App Path : " + appPath);
|
_logger.trace("PathUtils App Path : " + appPath);
|
||||||
_logger.debug("PathUtils Class Path : " + classPath);
|
_logger.trace("PathUtils Class Path : " + classPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAppPath() {
|
public String getAppPath() {
|
||||||
|
|||||||
@ -19,11 +19,7 @@ package org.maxkey.web.contorller;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.apache.commons.mail.DefaultAuthenticator;
|
import org.apache.commons.mail.DefaultAuthenticator;
|
||||||
import org.apache.commons.mail.EmailException;
|
import org.apache.commons.mail.EmailException;
|
||||||
import org.apache.commons.mail.HtmlEmail;
|
import org.apache.commons.mail.HtmlEmail;
|
||||||
@ -37,7 +33,6 @@ import org.maxkey.persistence.service.RegistrationService;
|
|||||||
import org.maxkey.persistence.service.UserInfoService;
|
import org.maxkey.persistence.service.UserInfoService;
|
||||||
import org.maxkey.util.DateUtils;
|
import org.maxkey.util.DateUtils;
|
||||||
import org.maxkey.util.StringUtils;
|
import org.maxkey.util.StringUtils;
|
||||||
import org.maxkey.web.WebConstants;
|
|
||||||
import org.maxkey.web.WebContext;
|
import org.maxkey.web.WebContext;
|
||||||
import org.maxkey.web.message.Message;
|
import org.maxkey.web.message.Message;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -82,7 +77,7 @@ public class RegistrationController {
|
|||||||
return new ModelAndView("registration/register");
|
return new ModelAndView("registration/register");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//邮件验证注册
|
||||||
@RequestMapping(value={"/register"})
|
@RequestMapping(value={"/register"})
|
||||||
public ModelAndView reg(@ModelAttribute("registration") Registration registration) {
|
public ModelAndView reg(@ModelAttribute("registration") Registration registration) {
|
||||||
_logger.debug("Registration /registration/register.");
|
_logger.debug("Registration /registration/register.");
|
||||||
@ -183,21 +178,7 @@ public class RegistrationController {
|
|||||||
return modelAndView;
|
return modelAndView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//直接注册
|
||||||
/**
|
|
||||||
* view register
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping(value={"/register"})
|
|
||||||
public ModelAndView register(HttpServletRequest request,HttpServletResponse response) {
|
|
||||||
_logger.debug("/register.");
|
|
||||||
ModelAndView modelAndView = new ModelAndView("registration/register");
|
|
||||||
Object loginErrorMessage=WebContext.getAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE);
|
|
||||||
modelAndView.addObject("loginErrorMessage", loginErrorMessage==null?"":loginErrorMessage);
|
|
||||||
WebContext.removeAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE);
|
|
||||||
return modelAndView;
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping(value={"/registeron"})
|
@RequestMapping(value={"/registeron"})
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Message registeron(UserInfo userInfo,@RequestParam String emailMobile) throws ServletException, IOException {
|
public Message registeron(UserInfo userInfo,@RequestParam String emailMobile) throws ServletException, IOException {
|
||||||
|
|||||||
@ -175,7 +175,7 @@
|
|||||||
captchaCountTimer=setInterval("getCaptchaCount()", 1000);
|
captchaCountTimer=setInterval("getCaptchaCount()", 1000);
|
||||||
});
|
});
|
||||||
$('#register').on('click',function(){
|
$('#register').on('click',function(){
|
||||||
window.location.href="<@base />/register";
|
window.location.href="<@base />/registration/forward";
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -82,7 +82,7 @@ $(function(){
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2"></div>
|
<div class="col-md-2"></div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<form action="<@base/>/register.do" method="post" class="needs-validation" novalidate>
|
<form action="<@base/>/registration/registeron" method="post" class="needs-validation" novalidate>
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<td><@locale code="forgotpassword.emailmobile"/></td>
|
<td><@locale code="forgotpassword.emailmobile"/></td>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user