title: How to track delete events with Spring Data JPA Auditing and Envers?
body: <p>In my audited entity i have fields:</p>
  
  <pre><code>@LastModifiedBy
  private String lastModifiedBy;
  
  @LastModifiedDate
  private OffsetDateTime lastModifiedDate;
  </code></pre>
  
  <p>But they doesn't change when entity is deleted.
  As i understand, i need to customize <code>org.springframework.data.jpa.domain.support.AuditingEntityListener</code> and add <code>@PreRemove</code> there, but i dont understand how to implement this, because i'm always have </p>
  
  <pre><code>org.hibernate.InstantiationException: Could not instantiate managed bean directly
  </code></pre>
  
  <p>Is there any other options to track delete events and store updated fields to Envers audit table ?</p>