@Override public ObjectIdentity getObjectIdentity(final Object domainObject) { final AclManaged aclManaged = AnnotationUtils.findAnnotation(domainObject.getClass(), AclManaged.class); // acl的所谓的class_id建议用AclClassId注解指定! final String typeName; if (aclManaged == null) { typeName = domainObject.getClass().getName(); } else { if (aclManaged.value().isEmpty()) { logger.warn(domainObject.getClass() + "的AclClassId值为空"); typeName = domainObject.getClass().getName(); } else { typeName = aclManaged.value(); } } final Serializable idValue = getIdValue(domainObject); if (idValue == null) { return null; } return new ObjectIdentityImpl(typeName, idValue); }