merge
This commit is contained in:
@@ -37,17 +37,25 @@ public class ShiroConfig {
|
||||
shiroFilterFactoryBean.setSecurityManager(securityManager());
|
||||
//配置访问权限
|
||||
Map<String, String> chains = new LinkedHashMap<>();
|
||||
//配置登录的url和登录成功的url
|
||||
shiroFilterFactoryBean.setLoginUrl("/user/login");
|
||||
shiroFilterFactoryBean.setUnauthorizedUrl("/403");
|
||||
chains.put("/user/logout", "logout");
|
||||
shiroFilterFactoryBean.setSuccessUrl("/doc");
|
||||
//静态资源
|
||||
chains.put("/META-INF/resources/**", "anon");
|
||||
chains.put("/resources/**", "anon");
|
||||
chains.put("/static/**", "anon");
|
||||
chains.put("/public/**", "anon");
|
||||
chains.put("/*.*", "anon");
|
||||
chains.put("/", "anon");
|
||||
chains.put("/doc", "anon");
|
||||
//验证码
|
||||
chains.put("/captcha", "anon");
|
||||
//swagger
|
||||
chains.put("/webjars/**", "anon");
|
||||
chains.put("/v2/api-docs", "anon");
|
||||
chains.put("/swagger-resources", "anon");
|
||||
chains.put("/configuration/ui", "anon");
|
||||
chains.put("/configuration/security", "anon");
|
||||
//
|
||||
chains.put("/druid", "anon");
|
||||
chains.put("/**", "authc");
|
||||
shiroFilterFactoryBean.setFilterChainDefinitionMap(chains);
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Welcome to the world</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>404</h2>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user