

Our demo project is the simple Groovy application based on Spring Boot. (or even centralized JaVers database shared for all applications in your company). Since audit data are decoupled from live data, you can choose where to store them.īy default, JaVers saves Snapshots to the application’s database, but you can point another one.įor example, SQL for application and MongoDB for JaVers JaVers saves them to the single table (or the collection in Mongo)Īs JSON documents with unified structure.Īdvantages? You can focus on domain objects and treat persistence and auditing It can be an advantage, you have audit data stored close to your live data.Įnvers’ tables look familiar. You can think about Envers as the tool for versioning database records.įor each audited entity, an audit table is created.īy default, the audit table name is created by adding a _AUD suffix to the original name. Other databases (like Cassandra, Elastic) might be added in the future. For now, JaVers comes with repository implementations for MongoDB and On the contrary, JaVers can be used with any kind of database and any kind of (for example JOOQ) - Envers is not an option. If you chose NoSQL database or SQL but with another persistence framework It has good integration with Hibernate but you can use it only with traditional SQL databases. There are two big differences between JaVers and Envers:

In the third section, I check how both tools are coping with queries on audit data. In the second section, I show the simple, demo application for managing organization structure withĭata audit made by both JaVers and Envers. If you consider which tool will be better for your project, this article is the good starting point. JaVers offers the fresh approach and technology independence.

In the Java world, there are two tools for data auditing: EnversĮnvers is here for a long time and it’s considered mainstream.
