繁体   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