- Add the hibernate-envers dependency to your classpath.
- Annotate your entity or entity properties with the [@Audited][df1] annotation.
audit table with append _AUD as the suffix of each annotated table which will contains all modification, creation and deletion for tables. Official Document
- rev: revision number. basically, one transaction is one revision. that means rev is global and you can query for various tables at a particular version.
- revtype: revision type.
0: create, 1: modify, 2: delete