Spring boot Junit在SpringBootVersion2.3中未解决

Spring boot Junit在SpringBootVersion2.3中未解决,spring-boot,junit,junit5,spring-test,Spring Boot,Junit,Junit5,Spring Test,我创建了一个SpringBoot应用程序版本2.3.2,当我尝试用JUnit5编写单元测试时。STS IDE中的单元测试类显示org.junit未解析。 这是我对build.gradle的依赖 dependencies { compile "org.springframework.boot:spring-boot-starter-actuator:2.3.2.RELEASE" compile "org.springframework.boot:spr

我创建了一个SpringBoot应用程序版本2.3.2,当我尝试用JUnit5编写单元测试时。STS IDE中的单元测试类显示org.junit未解析。 这是我对build.gradle的依赖

dependencies {
    compile "org.springframework.boot:spring-boot-starter-actuator:2.3.2.RELEASE"
    compile "org.springframework.boot:spring-boot-starter-web:2.3.2.RELEASE"
    compile "org.springframework.boot:spring-boot-starter-log4j2:2.3.2.RELEASE"
    testCompile "org.springframework.boot:spring-boot-starter-test:2.3.2.RELEASE"
}
测试等级:

import static org.junit.jupiter.api.Assertions.*;
导入org.junit.jupiter.api.Test;
类PasswordvaultComponentTest{
@测试无效测试()
{
失败(“尚未实施”);
}      
}

因为JUnitJupiter已经绑定到SpringBoot2.3.2中。我不需要在gradle中显式地提供Junit Jupiter依赖项。我是否缺少任何其他配置。非常感谢您的帮助。

我的测试类在src/main/java包中。因此,我将测试类移动到包src/test/java中,并解决了依赖关系