首页 > csdn导入, 技术 > Upgrading to Spring Security 2.0(zz)

Upgrading to Spring Security 2.0(zz)

原文:http://raibledesigns.com/rd/entry/upgrading_to_spring_security_2
就是appfuse作者的博客,做了一些精简

1. 包变化:org.acegisecurity  => org.springframework.security
2. 依赖变化(略,不用Maven)
3. tag标签的开头authz => security, 然后把taglib的关联项改为

<%@ taglib uri="http://www.springframework.org/security/tags"
    prefix="security" %>

4. web.xml,把<filter-class>改为org.springframework.web.filter.DelegatingFilterProxy,另外还要加上<init-param>标签

    <init-param>
        <param-name>targetBeanName</param-name>
        <param-value>springSecurityFilterChain</param-value>
    </init-param>

5. 修改security.xml,使用新的语法.根据作者的说法,AppFuse的security.xml的长度从177行下降到了33行,因为使用了很多convention over configuration的元素,如<http auto-config=”true”/>。关于语法,还需要一些实践把握。

  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word