今天学习SpringLdap学到了使用LdapTemplate.bind()向LDAP服务器添加数据,却发现明明按照API文档指示去做,但是依旧不对。

1.可能的原因是你的LDAP服务器并没有该节点。

那么你可以先创建该节点:http://blog.csdn.net/qq_22156459/article/details/78085685

2.如果你都是按照API去做的,依然出现

Ldap使用bind函数产生的问题

代码跟我的一样

Ldap使用bind函数产生的问题

我的配置文件

Ldap使用bind函数产生的问题

问题出现在我的buildDn上,我的配置文件中已经配置的baseDn,所以不需要在代码中再次写明。

修改后

Ldap使用bind函数产生的问题

就可以了。



相关文章:

  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-06
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-29
  • 2021-05-22
  • 2021-05-28
  • 2021-05-26
  • 2022-12-23
  • 2021-11-19
相关资源
相似解决方案