【问题标题】:Using the JDK LDAP library, how can I add more than one description?使用 JDK LDAP 库,如何添加多个描述?
【发布时间】:2009-03-14 17:55:21
【问题描述】:

我可以使用我的 IDE 添加两个描述(属性),但在 Java 中我只能添加一个描述。如何添加第二个?

我正在使用 JDK LDAP 库。

【问题讨论】:

    标签: java ldap


    【解决方案1】:

    经过一些尝试,我能够自己做到这一点

    
    Attributes attrs = new BasicAttributes(true);
    BasicAttribute b = new BasicAttribute("description");
    b.add("a");
    b.add("b");
    attrs.put(b);
    

    【讨论】:

    • 既然你自己找到了答案,你应该接受这个答案
    猜你喜欢
    • 2021-09-10
    • 1970-01-01
    • 1970-01-01
    • 2016-04-14
    • 1970-01-01
    • 2023-04-09
    • 2021-10-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多