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

Comments

Projects
None yet
2 participants
@arnzel

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

This comment has been minimized.

Member

bartoszwalacik commented Sep 23, 2016

You mean in spring boot starter?

@arnzel

This comment has been minimized.

arnzel commented Sep 23, 2016

Yes in the spring boot starter

@bartoszwalacik

This comment has been minimized.

Member

bartoszwalacik commented Sep 23, 2016

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

@arnzel

This comment has been minimized.

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

This comment has been minimized.

Member

bartoszwalacik commented Sep 28, 2016

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

mwesolowski added a commit that referenced this issue Oct 27, 2016

bartoszwalacik added a commit that referenced this issue Oct 30, 2016

Merge pull request #451 from javers/issue-435-auditable-aspects-deact…
…ication

 #435 auditable aspects deactivation
@bartoszwalacik

This comment has been minimized.

Member

bartoszwalacik commented Oct 30, 2016

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