这是一个ldap结构,将动态创建并删除这些tanant中的租户和组:
dc=example, ds=com
ou=Tenants
ou=TenantA
cn=GroupA
cn=GroupB
ou=TenantB
ou=TenantC
如何使用spring LdapRepository访问这些结构?
@Entry(
base = "ou=Tenants",
objectClasses = { "organizationalUnit", "top" })
public class Tenant implements Persistable<Name> {
@Id
private Name id;
// was TenantA, TenantB ... and so on
@Attribute(name = "on")
private String organizationalUnit;
// example: if its TenantA => GroupA, GroupB
@[#ANNOTATION](name = "[#NAME]")
private Set<Group> groups;
...
}
[#ANNOTATION]和[#NAME]在哪里?
还是不可能用LdapRepository做到这一点?