java.lang.NoClassDefFoundError: org/springframework/data/repository/config/BootstrapMode
2022-09-03 02:19:34
我正在用spring boot做这个项目,我试图写一些测试,但可悲的是,我得到了这个异常堆栈跟踪:
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [somepath/config/PostgresJpaConfig.class]; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/repository/config/BootstrapMode
Caused by: java.lang.NoClassDefFoundError: org/springframework/data/repository/config/BootstrapMode
我查看了我的build.gradle中是否缺少某种依赖关系,但我不这么认为。BootstrapMode在任何地方都不存在,甚至在Central Maven Repository上也不存在。我用IntelliJ搜索了我的整个项目,寻找任何类型的BootstrapMode外观,没有任何运气。
这是我的PostgrsJpaConfig类:PostgresJpaConfig类