注释类型 AttributeAccessor


  • @Target({TYPE,METHOD,FIELD})
    @Retention(RUNTIME)
    public @interface AttributeAccessor
    Names a persistent property access strategy (PropertyAccessStrategy) to use. Can be specified at either:
    • TYPE level, which will act as naming the default accessor strategy for all attributes on the class which do not explicitly name an accessor strategy
    • METHOD/FIELD level, which will be in effect for just that attribute.
    Should only be used to name custom PropertyAccessStrategy. For property/field access, the JPA Access annotation should be preferred using the appropriate AccessType. However, if this annotation is used with either value="property" or value="field", it will act just as the corresponding usage of Access.
    作者:
    Steve Ebersole, Emmanuel Bernard
    另请参阅:
    PropertyAccessStrategy, PropertyAccessStrategyResolver