我想根据我们的AD验证用户,所以我知道我需要spring security和spring ldap.
这是我的POM中的内容:
org.springframework.security
org.springframework.security.core
3.0.0.RELEASE
...
org.springframework.ldap
spring-ldap
1.3.0.RELEASE
pom
provided
以下是我的secruity-context中的相应条目:
..
但是,当我运行我的应用程序使用:
mvn jetty:run
我收到以下错误:
If you are using LDAP 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:
java.lang.ClassNotFoundException: org.springframework.ldap.core.support.BaseLdapPathContextSource
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:258)
at org.springframework.security.config.ldap.ContextSourceSettingPostProcessor.postProcessBeanFactory(ContextSourceSettingPostProcessor.java:33)