Join GitHub today
Deactivating @JaversSpringDataAuditable by configuration #435
Hi.I would like to activate/deactivate the functionality of the Annotation @JaversSpringDataAuditable by a configuration property.
Can the contructor of "JaversSpringDataAuditableRepositoryAspect" be changed so that i can commit an own implementation of "OnSaveAuditChangeHandler". So the method "handle" can only invoke the commit only if the configuration property is active.
Or is there a better wy for my intention ?
Hi. I got some MongoRepositories to which i added the Annotation "JaversSpringDataAuditable". The Annotation does what it should do, but for a reason, i dont know yet, our software is obviously slower with these Annotations. So i would like to deactivate the creating the snapshots of the entities until i find the problem. At the moment i comment out these annotations. A better solution wouldbe that i can add a property in my spring boot config with the name "auditEnabled" and then add some logic which activates/deactivates the creating of snapshots depending on the value of this property.
Or in other words: it would be good to deactivate/activate the Annotations by only changing one line.
I hope the intention is clear now.