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”/>。关于语法,还需要一些实践把握。

Leave a Reply

Your email address will not be published.