Skip to content

Trying out the auditing capabilities of Hibernate Envers paired with Spring Boot.

Notifications You must be signed in to change notification settings

XeNz/hibernate-envers-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hibernate Envers audit test

Start project

Start PostgreSQL database using: docker-compose up -d

Launch Spring boot Application using dev profile

Remarks

  • This project auto generates and applies the DDL. In a real application you will have to seed the DDL yourself.
  • CustomRevisionEntityListener implementation will need to be changed for actual use
  • AuditRevisionEntity will probably contain more metadata in a real application
  • Be sure to match the Envers version to the Hibernate version you are currently using
  • I don't really see a concrete use case for custom listeners yet, unless you would want to not auto register the default listeners
  • Conditional logic can be done by overriding EnversXXXEventListenerImpl. Checking request context can be done using RequestContextHolder

About

Trying out the auditing capabilities of Hibernate Envers paired with Spring Boot.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages