【问题标题】:Spring security context XMLSpring 安全上下文 XML
【发布时间】:2015-09-13 20:19:45
【问题描述】:

我正在尝试将 Spring 安全性与我的 Apache Wink 应用程序集成。 REST 服务与 spring 集成并且工作正常。

当我在 Spring 上下文中进行更改以添加 Spring 安全性时,我开始出现以下错误。

13:53:08,199 错误 [org.springframework.web.context.ContextLoader] (ServerService 线程池 -- 127) 上下文初始化失败:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: 第 36 行来自类路径资源 [applicationContext.xml] 的 XML 文档无效;嵌套异常是 org.xml.sax.SAXParseException:cvc-complex-type.2.4.a:发现以元素“authentication-manager”开头的无效内容。 '{"http://www.springframework.org/schema/beans":import, "http://www.springframework.org/schema/beans":alias, "http://www.springframework.org/schema/beans":bean, WC[##other:"http://www.springframework.org/schema/beans"], "http://www.springframework.org/schema/beans":beans} 之一预计。

我有自己的身份验证提供程序。下面是我的应用程序上下文 xml 文件。 谁能告诉我它有什么问题?

【问题讨论】:

    标签: spring-security


    【解决方案1】:

    我想通了。我的默认命名空间是 bean,所以它在那个 ns.我将标签更改为指向安全 ns 并且应用程序构建良好。

    <security:authentication-manager alias="authenticationManager">
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-03-27
      • 1970-01-01
      • 2012-11-19
      • 1970-01-01
      • 2021-12-14
      • 2011-08-18
      • 1970-01-01
      相关资源
      最近更新 更多