Configuring envers with maven

Configuring envers with maven, hibernate and spring on eclipse.

  1. In eclipse
  2. find pom.xml
  3. click on the pom.xml tab to see the actual xml code
  4. Add the JBoss Repository according to:
  5. Go to the Dependencies tab on the pom.xml
  6. click Add...
  7. Start writing "envers" in "Enter groupId..." field
  8. "org.hibernate hibernate-envers" should appear in the results, instead of the latest version, enter your hibernate version, or "${org.hibernate.version}" to copy it dynamically.
  9. save pom.xml

You now have envers configured, just add @Audited above the classes/properties you want to audit.
Post a Comment