LdapContext获取对象的属性

//            dn = "cn=1,cn=Users,DC=域名,DC=COM";
//            Attributes answer = ctx.getAttributes(dn);
//            for (NamingEnumeration ae = answer.getAll(); ae.hasMore();) {
//                Attribute attr = (Attribute) ae.next();
//                System.out.println("attribute: " + attr.getID());
//                /* Print each value */
//                for (NamingEnumeration e = attr.getAll(); e.hasMore(); System.out
//                        .println("value: " + e.next()))
//                    ;
//            }

原文地址:https://www.cnblogs.com/nidongde/p/5254313.html