springboot中@Test爆红的问题

问题遇到的现象和发生背景

明明引入了Junit的依赖,为啥我写测试代码的时候用到的@Test注解爆红了。

用代码块功能插入代码,请勿粘贴截图
    <dependency>
        <groupId>junitgroupId>
        <artifactId>junitartifactId>
        <version>4.13.2version>
        <scope>testscope>
    dependency>
运行结果及报错内容

Cannot resolve symbol 'Test'

截图看看,你的工程

检查有没有 导入 Test注解

import org.junit.Test;

如果导入了,再点这个试试

img