pom.xml中的spring ldap依赖项 - 异常

时间:2013-06-06 13:39:23

标签: spring spring-security ldap

我使用spring LDAP。

弹簧servlet.xml中:

<authentication-manager alias="authenticationManager" xmlns="http://www.springframework.org/schema/security">
    <ldap-authentication-provider
        user-search-filter="(uid={0})"
        group-search-filter="member={0}"/>

</authentication-manager>

<sec:ldap-server url="ldap://__server__.com:389" />

的pom.xml:                      org.springframework.ldap             弹簧LDAP             1.3.0.RELEASE             POM             提供         

    <dependency>
        <groupId>org.springframework.ldap</groupId>
        <artifactId>spring-ldap-core</artifactId>
        <version>1.3.0.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.ldap</groupId>
        <artifactId>spring-ldap-core-tiger</artifactId>
        <version>1.3.0.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-ldap</artifactId>
        <version>3.0.1.RELEASE</version>
    </dependency>

运行时出现异常(mvn tomcat:run):

sparklr2 19:04:24.925 [ERROR] DispatcherServlet - Context initialization failed
<org.springframework.context.ApplicationContextException: Couldn't locate: org.s
pringframework.ldap.core.support.BaseLdapPathContextSource.  If you are using LD
AP with Spring Security, please ensure that you include the spring-ldap jar file
 in your application; nested exception is java.lang.ClassNotFoundException: org.
springframework.ldap.core.support.BaseLdapPathContextSource>org.springframework.
context.ApplicationContextException: Couldn't locate: org.springframework.ldap.c
ore.support.BaseLdapPathContextSource.  If you are using LDAP with Spring Securi
ty, please ensure that you include the spring-ldap jar file in your application;
 nested exception is java.lang.ClassNotFoundException: org.springframework.ldap.
core.support.BaseLdapPathContextSource

我可以在.m2文件夹

中看到
m2\repository\org\springframework\ldap\spring-ldap-core\1.3.0.RELEASE\spring-ldap-core-1.3.0.RELEASE.jar

spring-ldap-core-1.3.0.RELEASE.jar\org\springframework\ldap\core\support\BaseLdapPathContextSource.class

缺少什么?如何解决异常?

0 个答案:

没有答案