【发布时间】:2015-10-24 02:50:41
【问题描述】:
当我尝试更新 LDAP 数据库中的现有对象时,Spring LdapRepository save() 方法抛出异常。
org.apache.directory.api.ldap.model.exception.LdapEntryAlreadyExistsException: ERR_250_ENTRY_ALREADY_EXISTS
我应该使用什么方法来更新现有的 ldap 对象?
人物类:
@Entry(objectClasses = { "inetOrgPerson", "organizationalPerson", "person", "top" })
public class Person implements Serializable {
public Person() {
}
@Id
private Name dn;
@Attribute(name = "cn")
@DnAttribute(value = "cn")
@JsonProperty("cn")
private String fullName;
@Attribute(name = "uid")
private String uid;
private String mail;
@Attribute(name = "sn")
private String surname;
//setters and getters
}
个人回购界面:
public interface PersonRepo extends LdapRepository<Person> {
}
这就是我更新人的方式:
personRepo.save(person);
【问题讨论】:
-
请提供代码以帮助查明问题。
-
@marthursson,已更新
标签: java spring ldap spring-ldap