为了连接LDAP服务器,你需要确保声明了spring-boot-starter-data-ldap“Starter”或者spring-ldap-core依赖,然后在你的application.properties中声明你的服务器的URL。如下所示:
spring-boot-starter-data-ldap
spring-ldap-core
application.properties
spring.ldap.urls=ldap://myserver:1235 spring.ldap.username=admin spring.ldap.password=secret
如果你需要自定义连接设置,你可以使用spring.ldap.base或者spring.ldap.base-environment属性。
spring.ldap.base
spring.ldap.base-environment
最后更新于6年前