【问题标题】:multiple <security:http> section in spring security configuration filespring 安全配置文件中的多个 <security:http> 部分
【发布时间】:2013-11-29 19:32:53
【问题描述】:

我正在尝试在我的 spring security xml 文件中配置 2 种不同的身份验证类型。一个用于 BASIC,另一个用于 Kerberos,当只配置一个时它们都可以正常工作,但在同一文件中配置两者时出现以下错误

org.springframework.beans.factory.parsing.BeanDefinitionParsingException:配置问题:检测到重复元素

我使用的是 Spring Security 3.0.5,xml 架构是

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
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.0.xsd
http://www.springframework.org/schema/security 
http://www.springframework.org/schema/security/spring-security-3.0.xsd">

有人可以建议如何在一个应用程序中配置多个安全性:http 部分和身份验证管理器。

【问题讨论】:

  • 发布您的配置...

标签: java spring spring-security


【解决方案1】:

也许您可以像 post 这样添加多个身份验证提供程序?

然后您将拥有一个安全标签,但具有多个身份验证选项。

编辑

我在Stackoverflow 发现了类似的问题。作者希望通过 LDAP 和数据库进行身份验证。

【讨论】:

    猜你喜欢
    • 2012-12-28
    • 1970-01-01
    • 2014-11-09
    • 1970-01-01
    • 2014-02-05
    • 2013-10-22
    • 2015-02-22
    • 2016-06-25
    • 1970-01-01
    相关资源
    最近更新 更多