Class AuditingHandler

java.lang.Object
org.springframework.data.auditing.AuditingHandlerSupport
org.springframework.data.auditing.AuditingHandler
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
IsNewAwareAuditingHandler

public class AuditingHandler extends AuditingHandlerSupport implements org.springframework.beans.factory.InitializingBean
Auditing handler to mark entity objects created and modified.
Since:
1.5
Author:
Oliver Gierke, Christoph Strobl
  • Constructor Details

  • Method Details

    • from

      public static AuditingHandler from(MappingContext<?,?> mappingContext)
      Factory method that creates a new AuditingHandler for the given MappingContext.
      Parameters:
      mappingContext - must not be null.
      Since:
      3.0
    • setAuditorAware

      public void setAuditorAware(AuditorAware<?> auditorAware)
      Setter to inject a AuditorAware component to retrieve the current auditor.
      Parameters:
      auditorAware - must not be null.
    • markCreated

      public <T> T markCreated(T source)
      Marks the given object as created.
      Parameters:
      source -
    • markModified

      public <T> T markModified(T source)
      Marks the given object as modified.
      Parameters:
      source -
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean