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>

  • 相关阅读:
    vue通过input选取图片,jq的ajax向服务器上传img
    IDEA常用快捷键
    JavaScript预解析
    jQuery实现颜色打字机
    MVC超链接调用控制器内的方法
    jQuery实现鼠标移入切换图片
    聚类算法
    并行K-Means
    [Err] 1055
    地图匹配实践
  • 原文地址:https://www.cnblogs.com/yinziqiang0909/p/11206014.html
Copyright © 2011-2022 走看看