Skip to content

MongoProperties is not used at all but it is required #1324

Description

@fcanovas1986

Clear description of my expectations versus reality

Having configured the dependency javers-spring-boot-starter-mongo , when I run my application, I have the following error:

***************************
APPLICATION FAILED TO START
***************************

Description:

Field mongoProperties in `org.javers.spring.boot.mongo.JaversMongoAutoConfiguration` required a bean of type 'org.springframework.boot.autoconfigure.mongo.MongoProperties' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.boot.autoconfigure.mongo.MongoProperties' in your configuration.

That says that JaversMongoAutoConfiguration needs the MongoProperties bean. I don't use this bean to set mongo settings, I think it should be optional. What's more, I checked that MongoProperties bean is autowired and it is required in JaversMongoAutoConfiguration, but it is not used at all, so you could even remove it. But if this is not the case for any reason, at least should be Optional.

private MongoProperties mongoProperties; //from spring-boot-starter-data-mongodb

Steps To Reproduce

Configure the javers-spring-boot-starter-mongo and does not declare a MongoProperties bean in your application and run.

Javers' Version

7.3.2

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions