我正在使用spring-boot-starter-data-ldap
来管理ldap实体。我设置spring.ldap.base
的属性为dc=tonny,dc=name
,然后使用LdapUser
批注创建了一个名为@Entity
的实体类,其中的base
值是ou=people
。
@Entry(
base = "ou=people",
objectClasses = {"top", "person", "organizationalPerson", "inetOrgPerson"}
)
public final class LdapUser {
@Id
private Name id;
@Attribute(name = "uid")
@DnAttribute(value = "uid", index = 1)
private String uid;
//some other fields
}
问题在于id字段的值仅包含uid=xxx
和ou=people
,但恐怕实体的DN应该是uid=xxx,ou=people,dc=tonny,dc=name
。我还尝试将index
更改为3
,但它给我一个错误,即大小为2但索引为3。