【问题标题】:How to fix " java: package org.junit.jupiter.api does not exist "如何修复\"java: package org.junit.jupiter.api does not exist\"
【发布时间】:2023-01-12 15:37:31
【问题描述】:

enter image description here

这是我的第一个 springboot crud。请帮我修正错误。

【问题讨论】:

  • 请将代码和错误消息添加为文本而不是图像

标签: java spring-boot junit-jupiter


【解决方案1】:

您必须将依赖项添加到类路径中。如果您使用的是 maven 添加:

<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
    <groupId>org.junit.jupiter</groupId>
    <artifactId>junit-jupiter-api</artifactId>
    <version>5.9.2</version>
    <scope>test</scope>
</dependency>

到你的 pom.xml

【讨论】:

    猜你喜欢
    • 2021-10-01
    • 2023-02-23
    • 2022-11-12
    • 2021-10-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-27
    • 2015-10-24
    相关资源
    最近更新 更多