Iva*_*sco 8 spring-test spring-boot junit5
在我的 POM 中,我将 Spring Boot 的版本从 2.3.5.RELEASE 升级到 2.4.2。结果,mvn clean test现在失败并出现错误
java.lang.NoClassDefFoundError: org/springframework/test/context/TestContextAnnotationUtils
Caused by: java.lang.ClassNotFoundException: org.springframework.test.context.TestContextAnnotationUtils
Run Code Online (Sandbox Code Playgroud)
在一个简单的测试中
package ch.ge.ael.enu.mediation;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class MediationApplicationTests {
@Test
void contextLoads() {
}
}
Run Code Online (Sandbox Code Playgroud)
有人有线索吗?
Marten Deinum 的评论是正确的:依赖关系在 Spring JAR 版本之间造成了严重破坏。对于 Camel 3.6.0,Spring Boot 2.3.5.RELEASE 可以,但 Spring Boot 2.4.2 不行。将 Camel 升级到 3.7.1 就成功了。
| 归档时间: |
|
| 查看次数: |
5333 次 |
| 最近记录: |