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

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

Open
fcanovas1986 opened this issue Sep 5, 2023 · 4 comments
Open

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

fcanovas1986 opened this issue Sep 5, 2023 · 4 comments

Comments

@fcanovas1986
Copy link
Contributor

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

@bartoszwalacik
Copy link
Member

bartoszwalacik commented Sep 5, 2023

@fcanovas1986 thanks for reporting, you are right this property seems unused so the issue is easy to fix. Feel free to contribute a PR with the fix

@fcanovas1986
Copy link
Contributor Author

Hi @bartoszwalacik , could you review the opened PR? it is very little :) .

Thanks!

@bartoszwalacik
Copy link
Member

thanks @fcanovas1986 , I will release it tomorrow

@bartoszwalacik
Copy link
Member

fixed released in 7.3.3

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

No branches or pull requests

2 participants