springboot 添加@Test(org.junit.Test) 注解后,idea右键菜单,没有运行项

网上试了很多办法,包括检查idea的junit插件是否已安装,我安装了也用不了
清除idea 缓存,也不行。
后来将org.junit.Test 换成 org.junit.jupiter.api.Test 就可以了。
maven 引入包(注意这里版本换成5.9.3后,不行)
合适的版本吗,你去掉以为版本号,会弹出一个合适的版本号给你选

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.1</version> <!-- 请根据需要选择合适的版本 -->
<scope>test</scope>
</dependency>

浙公网安备 33010602011771号