简体   繁体   中英

Disable javers audit in application.properties

We are using Javers in our spring boot application and have several application.properties profiles, eg for different environments/local testing. In some profiles we would like to disable javers or if that's not possible, not persist the audit by using the default h2 repository.

All our JpaRepositories are annotated with @JaversSpringDataAuditable. If we try to remove the mongoDB database connection from our application.properties, we get a com.mongodb.MongoTimeoutException.

Does anyone know if there is a flag available in the application.properties that could either disable the audit or disable auditing into our mongodb and instead use the default h2 repository?

That is an interesting case. There is no such flag but it looks like an easy thing to implement. Feel free to open a PR in https://github.com/javers/javers

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM