gpt4 book ai didi

java - Spring security ldap 与 struts 1.1 集成

转载 作者:行者123 更新时间:2023-12-01 13:06:57 25 4
gpt4 key购买 nike

无法找到在 struts 1.1 应用程序中集成 Spring security ldap 身份验证的步骤。

最佳答案

请按照以下步骤操作:

  1. 将 spring.jar 添加到您的项目中
  2. 在 web.xml 文件中添加以下代码

    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    /WEB-INF/acegi-security-config.xml
    </param-value>
    </context-param>


    <!-- Spring Security Filter -->

    <filter>
    <filter-name>Acegi Filter Chain Proxy</filter-name>
    <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
    <init-param>
    <param-name>targetClass</param-name>
    <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
    </init-param>
    </filter>

    <filter-mapping>
    <filter-name>Acegi Filter Chain Proxy</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter>
    <filter-name>AuthenticatedFilter</filter-name>
    <filter-class>com.security.AuthenticatedFilter</filter-class>
    </filter>

    <filter-mapping>
    <filter-name>AuthenticatedFilter</filter-name>
    <servlet-name>action</servlet-name>
    </filter-mapping>

    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener
    </listener-class>
    </listener>

acegi-security-config.xml,是spring security的配置文件

关于java - Spring security ldap 与 struts 1.1 集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23189984/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com