@SpringBootTest(classes = SinotnEnmsApplication.class)
classes == (工程的启动类)
图片:
pom.xml中引入以下代码
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
运行成功