Annotation Interface EnableDatastoreAuditing


@Inherited @Documented @Target(TYPE) @Retention(RUNTIME) @Import(DatastoreAuditingRegistrar.class) public @interface EnableDatastoreAuditing
The annotation used to activate auditing functionality.
Since:
1.2
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Configures a AuditorAware bean to be used to lookup the current principal.
    Configures a DateTimeProvider bean name that allows customizing the LocalDateTime to be used for setting creation and modification dates.
    boolean
    Configures whether the entity shall be marked as modified on creation.
    boolean
    Configures whether the creation and modification dates are set.
  • Element Details

    • auditorAwareRef

      String auditorAwareRef
      Configures a AuditorAware bean to be used to lookup the current principal.
      Returns:
      the name of a custom auditor provider. If blank then one will be looked up bean type.
      Default:
      ""
    • setDates

      boolean setDates
      Configures whether the creation and modification dates are set. Defaults to true.
      Returns:
      whether dates are set by the auditing functionality.
      Default:
      true
    • modifyOnCreate

      boolean modifyOnCreate
      Configures whether the entity shall be marked as modified on creation. Defaults to true.
      Returns:
      whether an entity is marked as modified when it is created.
      Default:
      true
    • dateTimeProviderRef

      String dateTimeProviderRef
      Configures a DateTimeProvider bean name that allows customizing the LocalDateTime to be used for setting creation and modification dates.
      Returns:
      the name of the custom time provider. If blank then one will be looked up bean type.
      Default:
      ""