配置安全注释时出错Spring安全性

时间:2011-07-17 17:00:45

标签: spring-security

我在配置中遇到问题:

 <sec:global-method-security secured-annotations="enabled" />

以下错误:

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.getLocalName(Lorg/w3c/dom/Node;)Ljava/lang/String

有一些具有架构安全性的不可比拟的jar文件

<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:sec="http://www.springframework.org/schema/security"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:aop="http://www.springframework.org/schema/aop"
   xmlns:tx="http://www.springframework.org/schema/tx"
   xmlns:beans="http://www.springframework.org/schema/beans"
   xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">

我正在使用以下安全jar:

弹簧安全核虎-2.0.4

弹簧-2.5

1 个答案:

答案 0 :(得分:0)

看起来您可能没有所需的spring-security依赖关系(spring-security-tiger-xxx.jar)。

根据spring-security-2.0.2 xsdsecured-annotations可用。