java. lang.NoClassDefFoundError:org / springframework / data / repository / config / BootstrapMode

I'm doing this project with spring boot. I try to write some tests, but unfortunately I get this exception stack trace:

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

Let me see my build Is there a lack of dependency in gradle, but I don't think so Bootstrap mode something doesn't exist anywhere, even on the central Maven repository I used IntelliJ to search for any type of bootstrap mode appearance throughout the project without any luck

These are my gradle dependencies:

This will be my test case: spring boot test case

This is my postgrsjpaconfig class: postgresjpaconfig class

Solution

I should use org springframework. Boot: spring boot starter data JPA instead of org springframework. Data dependency

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>