Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deactivating @JaversSpringDataAuditable by configuration #435

Closed
arnzel opened this issue Sep 22, 2016 · 7 comments
Closed

Deactivating @JaversSpringDataAuditable by configuration #435

arnzel opened this issue Sep 22, 2016 · 7 comments
Labels

Comments

@arnzel
Copy link

arnzel commented Sep 22, 2016

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 ?

@bartoszwalacik
Copy link
Member

You mean in spring boot starter?

@arnzel
Copy link
Author

arnzel commented Sep 23, 2016

Yes in the spring boot starter

@bartoszwalacik
Copy link
Member

Could you describe your use case? I wonder if this feature would be useful for other javers users

@arnzel
Copy link
Author

arnzel commented Sep 27, 2016

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.

@bartoszwalacik
Copy link
Member

bartoszwalacik commented Sep 28, 2016

Right, think about a PR. It looks like a small change in javers-spring-boot-starters configuration

@bartoszwalacik
Copy link
Member

fixed in release 2.6.0
see http://javers.org/release-notes/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants