ObjectIdentity
인터페이스를 살펴보십시오. 시스템에서 보호되는 오브젝트를 나타냅니다.
/**
* Obtains the actual identifier. This identifier must not be reused to represent other domain objects with
* the same javaType.
*
* Because ACLs are largely immutable, it is strongly recommended to use
* a synthetic identifier (such as a database sequence number for the primary key). Do not use an identifier with
* business meaning, as that business meaning may change in the future such change will cascade to the ACL
* subsystem data.
*
* @return the identifier (unique within this type; never null)
*/
Serializable getIdentifier();
/**
* Obtains the "type" metadata for the domain object. This will often be a Java type name (an interface or a class)
* – traditionally it is the name of the domain object implementation class.
*
* @return the "type" of the domain object (never null).
*/
String getType();
당신이 볼 수 있듯이 봄 보안 식별자의 유형을 설명하는 Serializable
를 사용합니다. 그래서 클래스 이름과 함께 String을 사용할 수 있습니다.
스프링 시큐리티의 저자는 대부분의 사람들이 long/integer ID로 객체를 식별한다고 가정하므로 SQL 스키마를 업데이트해야합니다.
create table acl_object_identity(
...
object_id_class bigint not null,
object_id_identity bigint not null,
내가 검사로서, JdbcMutableAclService
그것은 단지 ObjectIdentity
인터페이스를 사용하기 때문에 그 정의를 처리 할 수 있습니다.
org.springframework.security.acls
패키지의 소스 코드를 연구하십시오.