我刚开始穿春靴。我正在尝试将项目从旧的spring引导迁移到最新版本。
我在项目中更改了spring的版本。但是,当我构建该项目时,它在以下抛出计算错误的测试中失败。
package org.springframework.test.annotation does not exist
我的项目中有这个依赖项。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
<scope>test</scope>
</dependency>不知道我可能错过了什么?
发布于 2018-06-22 05:36:01
将spring-boot-test更改为spring-boot-starter-test,如下所示:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
<scope>test</scope>
</dependency>至
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>有关初学者的更多信息,请参考http://www.baeldung.com/spring-boot-starters。
https://stackoverflow.com/questions/50974091
复制相似问题