qq_时光冲散了记忆的脉搏_1
2020-04-20 08:47
package com.neo.helloWorld.service; import com.neo.helloWorld.hello.HelloService; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import javax.annotation.Resource; @RunWith(SpringRunner.class) @SpringBootTest public class HelloTest { @Resource HelloService helloService; @Test public void sayHelloTest(){ helloService.sayHello(); } }
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> <version>4.11</version> </dependency> 添加版本4.11,版本4.13报错
是不是没有junit jar包的依赖。
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency>
Spring Boot 发送邮件
15289 学习 · 56 问题
相似问题