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
CodePudding user response:
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.
CodePudding user response:
For spring-boot:2.3.4, mongo v.4.0.5 would be good/is managed/tested.
(How Did I find: Through IDE (pom browser)/GitHub/Maven(central);)