0

春の LDAP を使用します。

春サーブレット.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 spring-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

何が欠けている?例外を解決する方法は?

4

0 に答える 0