Package com.freewebsys.blog.service

Examples of com.freewebsys.blog.service.UserInfoService


          ServletContext context = httpRequest.getSession()
              .getServletContext();
          ApplicationContext applicationContext = WebApplicationContextUtils
              .getWebApplicationContext(context);
          // 从spring中获得服务
          UserInfoService userInfoService = (UserInfoService) applicationContext
              .getBean("userInfoService");

          UserInfo userInfoTemp = userInfoService
              .getUserInfoByRememberMe(loginName, rememberMe);
          if (userInfoTemp != null) {
            httpRequest.getSession().setAttribute(
                GlobalConf.USER_SESSION, userInfoTemp);
            // 如果教研成功就更新记住我的key.更安全.
            String remembermeKey = userInfoService
                .updateUserInfoRememberMe(userInfoTemp.getId());
            Cookie cookie = new Cookie("rememberme", remembermeKey);
            cookie.setMaxAge(60 * 60 * 24 * 30);
            httpResponse.addCookie(cookie);
            cookie = new Cookie("loginName",
View Full Code Here

TOP

Related Classes of com.freewebsys.blog.service.UserInfoService

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.