zoukankan      html  css  js  c++  java
  • spring-shiro.xml配置文件

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
    <!--创建域-->
    <bean id="authRealm" class="ssm.shiro.realm.AuthRealm">

    </bean>
    <!--创建安全认证管理器-->
    <bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
    <property name="realm" ref="authRealm"></property>

    </bean>
    <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
    <property name="securityManager" ref="securityManager"></property>
    <property name="loginUrl" value="/people/toLogin.do"></property>
    <property name="unauthorizedUrl" value="error.jsp"></property>
    <property name="filterChainDefinitions">
    <value>
    <!--对静态资源不拦截-->
    /static/*=anon
    /people/login.do=anon
    /people/toLogin.do=anon
    /people/error.do=anon
    /people/index.do=anon
    <!--配置/user/list.do只有有user权限的用户才能访问
    /user/list.do=perms[user:list]
    -->
    <!--声明/user/logout.do使用logout的过滤器
    该过滤器会自动帮我们清除退出登录时要清除的东西
    -->
    /people/logout.do=logout
    /*=authc
    /*/*=authc
    </value>
    </property>
    </bean>
    </beans>

  • 相关阅读:
    [原]poj-2680-Choose the best route-dijkstra(基础最短路)
    [转]c/c++输入函数
    [原]poj-2524(裸并查集)
    [原]poj-1611-The Suspects(水并查集)
    ccnu-线段树-简单的区间更新(三题)
    团队博客(3)
    个人NABCD
    团队博客(2)
    团队博客(1)
    课堂练习:返回一个二维数组中最大子数组的和
  • 原文地址:https://www.cnblogs.com/yinziqiang0909/p/11206014.html
Copyright © 2011-2022 走看看