インターフェイスを見てください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
、SpringSecurityは識別子のタイプを説明するために使用します。したがって、クラス名でStringを使用することが可能です。
Spring Securityの作成者は、ほとんどの人が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
パッケージのソースコードを調べてください。