This commit is contained in:
xiangwb
2018-04-08 13:52:09 +08:00
parent d94c610a3e
commit 89465bf285
2 changed files with 11 additions and 1 deletions
@@ -64,7 +64,7 @@ public class ShiroConfig {
shiroFilterFactoryBean.setSecurityManager(securityManager());
//如果不设置默认会自动寻找Web工程根目录下的"/login.jsp"页面
shiroFilterFactoryBean.setLoginUrl("/login.html");
shiroFilterFactoryBean.setUnauthorizedUrl("/login.html");
shiroFilterFactoryBean.setUnauthorizedUrl("/unauthorized.html");
Map<String, Filter> filters = new HashMap<>();
filters.put("sessionFilter", sessionFilter());
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>unauthorized</title>
</head>
<body>
<h2>没有权限!</h2>
</body>
</html>