类 DefaultKeyGenerator

  • 所有已实现的接口:
    KeyGenerator

    @Deprecated
    public class DefaultKeyGenerator
    extends Object
    implements KeyGenerator
    已过时。
    as of Spring 4.0, in favor of SimpleKeyGenerator or custom KeyGenerator implementations based on hash codes
    Default key generator. Returns 0 if no parameters are provided, the parameter itself if only one is given or a hash code computed from all given parameters' hash code values. Uses the constant value 53 for any null parameters given.

    NOTE: As this implementation returns only a hash of the parameters it is possible for key collisions to occur. Since Spring 4.0 the SimpleKeyGenerator is used when no explicit key generator has been defined. This class remains for applications that do not wish to migrate to the SimpleKeyGenerator.

    从以下版本开始:
    3.1
    作者:
    Costin Leau, Chris Beams, Juergen Hoeller