Pratik Gaikwad
Pratik Gaikwad

Reputation: 33

which spring-data-mongodb version is supported by Spring-boot 2.3.4 because I am getting this error while server startup locally

Failed to introspect Class [org.springframework.data.mongodb.config.MongoConfigurationSupport] from ClassLoader

java.lang.NoClassDefFoundError: org/springframework/data/support/IsNewStrategyFactory

Caused by: java.lang.ClassNotFoundException: org.springframework.data.support.IsNewStrategyFactory

Upvotes: 3

Views: 2903

Answers (1)

Andy Wilkinson
Andy Wilkinson

Reputation: 116111

Dependency versions are listed in an appendix of Spring Boot's reference documentation. In that appendix can see that Spring Boot 2.3.4.RELEASE uses 3.0.4.RELEASE of org.springframework.data:spring-data-mongodb by default.

If you use Spring Boot's dependency management, either by inheriting from spring-boot-starter-parent or importing spring-boot-dependencies, you can declare a dependency without a version and Spring Boot's dependency management will give you the correct version automatically. You can learn more about this in the reference documentation.

Upvotes: 1

Related Questions