com.github.dactiv.showcase.web
类 SystemCommonController

java.lang.Object
  继承者 com.github.dactiv.showcase.web.SystemCommonController

@Controller
public class SystemCommonController
extends Object

系统安全控制器

作者:
maurice

构造方法摘要
SystemCommonController()
           
 
方法摘要
 String changePassword(String oldPassword, String newPassword)
          当前用户修改密码C.修改成功将会注销用户,重新登录
 Map<String,Object> changePortrait(javax.servlet.http.HttpServletRequest request)
          修改用户头像C
 Map<String,Object> changeProfile(String realname, String email, String portrait)
          修改个人信息C,修改成功将会重定向到主页
 org.springframework.http.ResponseEntity<byte[]> getCaptcha(javax.servlet.http.HttpSession session)
          生成验证码C
 org.springframework.http.ResponseEntity<byte[]> getCurrentUserPortrait()
          获取当前用户头像C
 void index()
          默认进入首页的C
 String login()
          登录C,返回登录页面。
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

SystemCommonController

public SystemCommonController()
方法详细信息

login

@RequestMapping(value="/login")
public String login()
登录C,返回登录页面。当C发现当前用户已经登录名且认真后,会自动跳转到index页面

返回:
String

index

@RequestMapping(value="/index")
public void index()
默认进入首页的C


changePassword

@RequestMapping(value="/change-password")
public String changePassword(String oldPassword,
                                            String newPassword)
当前用户修改密码C.修改成功将会注销用户,重新登录

参数:
oldPassword - 旧密码
newPassword - 新密码
返回:
String

changePortrait

@ResponseBody
@RequestMapping(value="/change-portrait")
public Map<String,Object> changePortrait(javax.servlet.http.HttpServletRequest request)
                                  throws IOException
修改用户头像C

参数:
request - HttpServletRequest
抛出:
IOException

changeProfile

@ResponseBody
@RequestMapping(value="/change-profile")
public Map<String,Object> changeProfile(String realname,
                                                                    String email,
                                                                    @RequestParam(required=false)
                                                                    String portrait)
                                 throws IOException
修改个人信息C,修改成功将会重定向到主页

参数:
user - 用户实体
返回:
String
抛出:
IOException

getCaptcha

@RequestMapping(value="/get-captcha")
public org.springframework.http.ResponseEntity<byte[]> getCaptcha(javax.servlet.http.HttpSession session)
                                                           throws IOException
生成验证码C

抛出:
IOException

getCurrentUserPortrait

@RequestMapping(value="/get-current-user-portrait")
public org.springframework.http.ResponseEntity<byte[]> getCurrentUserPortrait()
                                                                       throws IOException
获取当前用户头像C

返回:
ResponseEntity
抛出:
IOException


Copyright © 2014. All rights reserved.