Blu*_*Man 12 java spring gradle spring-data-jpa spring-boot
我正在用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
Run Code Online (Sandbox Code Playgroud)
我看看我的build.gradle中是否缺少某种依赖,但我不这么认为.该BootstrapMode啄不存在任何地方,甚至没有在中央Maven仓库.我使用IntelliJ搜索整个项目的任何类型的BootstrapMode外观,没有任何运气.
这是我的PostgrsJpaConfig类: PostgresJpaConfig类
Blu*_*Man 15
TL; DR:我正在混淆Spring版本.覆盖一个版本与另一个版本,你不应该这样做.
org.springframework.data我应该使用而不是使用依赖org.springframework.boot:spring-boot-starter-data-jpa.
| 归档时间: |
|
| 查看次数: |
8999 次 |
| 最近记录: |