博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SpringSecurity (Spring权限验证)
阅读量:7254 次
发布时间:2019-06-29

本文共 1031 字,大约阅读时间需要 3 分钟。

一、配置过滤器代理
          在web.xml中添加SpringSecurity过滤器代理:
            
[html] view plaincopy
        <filter>  
    <filter-name>springSecurityFilterChain</filter-name>  
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>  
</filter>  
<filter-mapping>  
    <filter-name>springSecurityFilterChain</filter-name>  
    <url-pattern>/*</url-pattern>  
</filter-mapping>  
         在classpath下添加spring-security.xml配置文件(名称自定)  , 在此配置文件中添加springSecurity命名空间。
             
[html] view plaincopy
<?xml version="1.0" encoding="UTF-8"?>  
  
<!-- - Sample namespace-based configuration - -->  
  
<beans:beans xmlns="http://www.springframework.org/schema/security"  
    xmlns:beans="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-3.1.xsd  
                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">  
  
</beans:beans>  

转载于:https://www.cnblogs.com/huapox/archive/2013/05/01/3516069.html

你可能感兴趣的文章
【DOM编程艺术】Ajax(Hijax)
查看>>
微信公众平台开发(十) 消息回复总结——用其xml模板
查看>>
iOS.CM5.CM4.CM2
查看>>
菜鸟学T-SQL---------SQL2005读书笔记1
查看>>
Python--函数(全局变量和局部变量)
查看>>
PLSQL Developer 不能连接 oracle 11g 64位 的解决办法
查看>>
byobu相关操作
查看>>
父页面操作嵌套iframe子页面的HTML标签元素
查看>>
在TSQL中用case,when之类同时查多种情况
查看>>
Math,random()返回区间内的随机数
查看>>
TCP/IP网络协议的通俗理解,socket,http,soap
查看>>
简单数论
查看>>
Linux 文件系统
查看>>
更换你的Chrome开发工具风格
查看>>
化工厂装箱员 洛谷 p2530
查看>>
代码替换修复总结
查看>>
ubuntu 14.04 LTS 右键菜单解压压缩包时出错
查看>>
Mysql 查询缓存
查看>>
ubuntu搭建mediawiki
查看>>
uoj#274. 【清华集训2016】温暖会指引我们前行(LCT)
查看>>