From 58765d5b51cd8427f26e90238e18eb99890b9354 Mon Sep 17 00:00:00 2001 From: JamesZBL <1146556298@qq.com> Date: Fri, 27 Apr 2018 22:24:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/len/controller/LoginController.java | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/len-sys/src/main/java/com/len/controller/LoginController.java b/len-sys/src/main/java/com/len/controller/LoginController.java index eb0b8e9..c95f43b 100644 --- a/len-sys/src/main/java/com/len/controller/LoginController.java +++ b/len-sys/src/main/java/com/len/controller/LoginController.java @@ -1,10 +1,7 @@ package com.len.controller; -import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; import com.len.core.annotation.Log; -import com.len.core.shiro.LoginRealm; import com.len.core.shiro.ShiroUtil; import com.len.entity.SysMenu; import com.len.entity.SysUser; @@ -12,32 +9,24 @@ import com.len.service.MenuService; import com.len.service.SysUserService; import com.len.util.VerifyCodeUtils; 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.authc.ExcessiveAttemptsException; import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.UnknownAccountException; import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.session.Session; -import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.subject.Subject; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; 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.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseStatus; + +import javax.servlet.ServletRequest; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.util.List; /** * @author zhuxiaomeng @@ -125,6 +114,7 @@ public class LoginController { public String main(){ return "main/main"; } + @Log(desc = "用户退出平台") @GetMapping(value = "/logout") public String logout() {