diff --git a/maxkey-common/src/main/java/org/maxkey/util/PathUtils.java b/maxkey-common/src/main/java/org/maxkey/util/PathUtils.java index 3861cf6a6..28eb030a3 100644 --- a/maxkey-common/src/main/java/org/maxkey/util/PathUtils.java +++ b/maxkey-common/src/main/java/org/maxkey/util/PathUtils.java @@ -83,7 +83,7 @@ public class PathUtils { System.setProperty("CLASSES_PATH", classPath); _logger.trace("PathUtils App Path : " + appPath); - _logger.debug("PathUtils Class Path : " + classPath); + _logger.trace("PathUtils Class Path : " + classPath); } public String getAppPath() { diff --git a/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/RegistrationController.java b/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/RegistrationController.java index 8fa325841..c9a88118b 100644 --- a/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/RegistrationController.java +++ b/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/RegistrationController.java @@ -19,11 +19,7 @@ package org.maxkey.web.contorller; import java.io.IOException; import java.util.Date; - 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.EmailException; 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.util.DateUtils; import org.maxkey.util.StringUtils; -import org.maxkey.web.WebConstants; import org.maxkey.web.WebContext; import org.maxkey.web.message.Message; import org.slf4j.Logger; @@ -82,7 +77,7 @@ public class RegistrationController { return new ModelAndView("registration/register"); } - + //邮件验证注册 @RequestMapping(value={"/register"}) public ModelAndView reg(@ModelAttribute("registration") Registration registration) { _logger.debug("Registration /registration/register."); @@ -182,22 +177,8 @@ public class RegistrationController { } 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"}) @ResponseBody public Message registeron(UserInfo userInfo,@RequestParam String emailMobile) throws ServletException, IOException { diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/login.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/login.ftl index 5f36d3793..5b0d5b8a8 100644 --- a/maxkey-web-maxkey/src/main/resources/templates/views/login.ftl +++ b/maxkey-web-maxkey/src/main/resources/templates/views/login.ftl @@ -175,7 +175,7 @@ captchaCountTimer=setInterval("getCaptchaCount()", 1000); }); $('#register').on('click',function(){ - window.location.href="<@base />/register"; + window.location.href="<@base />/registration/forward"; }); }); diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/registration/register.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/registration/register.ftl index f672dedd7..1791976ef 100644 --- a/maxkey-web-maxkey/src/main/resources/templates/views/registration/register.ftl +++ b/maxkey-web-maxkey/src/main/resources/templates/views/registration/register.ftl @@ -82,7 +82,7 @@ $(function(){
-
+
<@locale code="forgotpassword.emailmobile"/>