LDAP: error code 32 – No Such Object

Ldap: error code 32-no Such Object
ldap: error code 32-no Such Object
is calling
this. ldaptemplate. create(ldapUser);
was reported wrong. After searching for a long time, I did not find the reason. Finally, I saw a blog and realized that the configured base in the ldap context should not be added to the dn of the node

<ldap:context-source id="contextSource"
                  base="${ldap.base}" />

 @Entry(objectClasses = { "person", "inetOrgPerson", "organizationalPerson", "top" }, base="o=sf")
public class LdapUser {

For example, dn is o=sf,dc=aa,dc=com
ldap: base of contin-source is configured as dc=aa, base of dc=com
Entry is configured as o=sf, and can no longer be configured as o=sf,dc=aa,dc=com

Read More: