shiro展示用户名与注销
main.jsp
<%@ taglib prefix=“shiro” uri=“http://shiro.apache.org/tags” %>
…
欢迎您,亲爱的用户:
注销
LoginController
@RequestMapping("/logout")
public String logout(){
Subject currentUser = SecurityUtils.getSubject();
currentUser.logout();
return “redirect:/login”;
}