Package com.github.dactiv.showcase.service

Examples of com.github.dactiv.showcase.service.ServiceException


    User user = SystemVariableUtils.getSessionVariable().getUser();
   
    oldPassword = new SimpleHash("MD5", oldPassword.toCharArray()).toString();
   
    if (!user.getPassword().equals(oldPassword)) {
      throw new ServiceException("旧密码不正确.");
    }
   
    accountManager.updateUserPassword(user,newPassword);
     
    return "redirect:/logout";
View Full Code Here


   *
   * @param entity 用户实体
   */
  public void insertUser(User entity) {
    if (!isUsernameUnique(entity.getUsername())) {
      throw new ServiceException("登录帐号已存在");
    }
   
    String password = new SimpleHash("MD5", entity.getPassword()).toHex();
   
    entity.setPassword(password);
View Full Code Here

TOP

Related Classes of com.github.dactiv.showcase.service.ServiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.