zoukankan      html  css  js  c++  java
  • Spring整合Shiro

    1.首先要导入相应的依赖库

    <!-- https://mvnrepository.com/artifact/org.apache.shiro/shiro-spring -->
    <dependency>
        <groupId>org.apache.shiro</groupId>
        <artifactId>shiro-spring</artifactId>
        <version>1.4.1</version>
    </dependency>
    

    2.导入依赖库之后,就需要配置web.xml文件

    <filter>
            <filter-name>shiroFilter</filter-name><!--这里的"shiroFilter"名称必须要与Spring配置文件的名称保持一致,例如:如果要定义一个spring-shiro.xml配置文件的话,就需要为其追加同样的shiroFilter配置项--> 
         <filter-class>
             org.springframework.web.filter.DelegatingFilterProxy
         </filter-class>
         <init-param>
            <param-name>
              targetFilterLifecycle
            </param-name>
            <param-value>true</param-value>
          </init-param>
    </filter>
    <filter-mapping>
       <filter-name>shiroFilter</filter-name>
       <url-pattern>/*</url-pattern>
    </filter-mapping>

    3.

  • 相关阅读:
    【搜索结果】高亮显示
    【搜索面板】排序单选
    【搜索面板】价格信息单选
    根据接口返回的数据重组数组
    Array.from
    获取指定字符串第n次出现的位置索引
    Object
    验证码倒计时
    iview Form表单正则验证
    网络图片转base64格式
  • 原文地址:https://www.cnblogs.com/wxl123/p/11173792.html
Copyright © 2011-2022 走看看