条目的DN缺少spring.ldap.base中的值

时间:2019-08-17 09:12:10

标签: spring spring-boot ldap spring-data spring-ldap

我正在使用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=xxxou=people,但恐怕实体的DN应该是uid=xxx,ou=people,dc=tonny,dc=name。我还尝试将index更改为3,但它给我一个错误,即大小为2但索引为3。

0 个答案:

没有答案