This commit is contained in:
zxm 2018-04-28 22:49:03 +08:00
commit 7430ca4a16
1 changed files with 7 additions and 17 deletions

View File

@ -1,10 +1,7 @@
package com.len.controller; package com.len.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.len.core.annotation.Log; import com.len.core.annotation.Log;
import com.len.core.shiro.LoginRealm;
import com.len.core.shiro.ShiroUtil; import com.len.core.shiro.ShiroUtil;
import com.len.entity.SysMenu; import com.len.entity.SysMenu;
import com.len.entity.SysUser; import com.len.entity.SysUser;
@ -12,32 +9,24 @@ import com.len.service.MenuService;
import com.len.service.SysUserService; import com.len.service.SysUserService;
import com.len.util.VerifyCodeUtils; import com.len.util.VerifyCodeUtils;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.ExcessiveAttemptsException; import org.apache.shiro.authc.ExcessiveAttemptsException;
import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException; import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.session.Session; import org.apache.shiro.session.Session;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import javax.servlet.ServletRequest;
import org.springframework.web.bind.annotation.ResponseStatus; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.List;
/** /**
* @author zhuxiaomeng * @author zhuxiaomeng
@ -125,6 +114,7 @@ public class LoginController {
public String main(){ public String main(){
return "main/main"; return "main/main";
} }
@Log(desc = "用户退出平台") @Log(desc = "用户退出平台")
@GetMapping(value = "/logout") @GetMapping(value = "/logout")
public String logout() { public String logout() {