为了账号安全,请及时绑定邮箱和手机立即绑定

runwith是红色的,应该怎么办呢

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();
    }
}


正在回答

3 回答

如果错误都找出来,证明你学会了,其它可以从别人的代码中找错误也是一种学习方法。

orlaqoptxheqzjgghtktobkpebtx

0 回复 有任何疑惑可以回复我~
<dependency>
   <groupId>junit</groupId>
   <artifactId>junit</artifactId>
   <scope>test</scope>
   <version>4.11</version>
</dependency>
添加版本4.11,版本4.13报错


0 回复 有任何疑惑可以回复我~

是不是没有junit   jar包的依赖。

<dependency>
   <groupId>junit</groupId>
   <artifactId>junit</artifactId>
   <scope>test</scope>
</dependency>


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

runwith是红色的,应该怎么办呢

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信