簡體   English   中英

多 <security:http> spring安全配置文件中的一節

[英]multiple <security:http> section in spring security configuration file

我試圖在我的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部分和身份驗證管理器。

也許您可以像這篇文章中添加多個身份驗證提供程序?

然后,您將擁有一個安全標簽,但具有多個身份驗證選項。

編輯

我在Stackoverflow上發現了類似的問題。 作者想通過LDAP和數據庫進行身份驗證。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM