Skip to content

Allow manually setting of MongoDB instead of using Autowired details #694

@ClaudioConsolmagno

Description

@ClaudioConsolmagno

Currently JaversMongoAutoConfiguration.java forces you to use the autowired MongoClient (and MongoProperties). This is fine if you want to have javers auditing in the same host:DB as your primary mongoDB.

We have a use case where we want to keep the (javers) auditing DB and primary MongoDB separate and for that we want to be able to pass in mongo credentials from the properties file (e.g. with javers.uri) that will cause the autoconfig class to create a MongoClient instead of using the autowired instance.

What are the thoughts on this? Would be happy to submit a pull-request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions