首页 文章

Spring安全上下文XML

提问于
浏览
0

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

当我在spring上下文中进行更改以添加Spring安全性时,我开始遇到以下错误 .

13:53:08,199 ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 127) Context initialization failed: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 36 in XML document from class path resource [applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'authentication-manager'. One of '{"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}' is expected.

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

enter image description here

1 回答

  • 0

    我想到了 . 我的默认命名空间是bean,所以它在那个ns中看起来是认证管理器 . 我将标签更改为指向安全性ns并且应用程序构建良好 .

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

相关问题