diff --git a/src/main/asciidoc/jpa.adoc b/src/main/asciidoc/jpa.adoc index 77ba47b63c..05270c1d21 100644 --- a/src/main/asciidoc/jpa.adoc +++ b/src/main/asciidoc/jpa.adoc @@ -744,6 +744,19 @@ Note that the auditing feature requires `spring-aspects.jar` to be on the classp ---- ==== +You can also enable the `AuditingEntityListener` per entity using the `@EntityListeners` annotation: + +==== +[source, java] +---- +@Entity +@EntityListeners(AuditingEntityListener.class) +public class MyEntity { + +} +---- +==== + Now activating auditing functionality is just a matter of adding the Spring Data JPA `auditing` namespace element to your configuration: .Activating auditing using XML configuration