idea导入工程后,安装好maven依赖后,报错 junit不存在

problem

idea导入工程后,安装好maven依赖后,报错 junit不存在

reason

没有引入 junit

solution

解决办法 在 pom.xml中添加依赖即可

junit是idea自带的lib

xml 复制代码
<dependencies>
  <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.13</version>
    <scope>test</scope>
  </dependency>
</dependencies>
相关推荐
ccice011 小时前
全面掌握Spring Boot + MyBatis + Maven + MySQL:从开发到部署的后端技术详解
spring boot·maven·mybatis
QQ22792391022 小时前
Java springboot基于微信小程序的智慧旅游导游系统景点门票酒店预订(源码+文档+运行视频+讲解视频)
java·spring boot·微信小程序·maven·vuejs
范什么特西3 小时前
解决idea未指定jdk问题webapp未被识别问题
java·开发语言·intellij-idea
Rsun045513 小时前
IDEA隐藏无关文件
java·elasticsearch·intellij-idea
ooseabiscuit4 小时前
记录 idea 启动 tomcat 控制台输出乱码问题解决
java·tomcat·intellij-idea
biubiubiu07067 小时前
Maven 父子工程 SpringBoot 多模块
java·spring boot·maven
摇滚侠19 小时前
帮我整理一份 IDEA 开发中常用快捷键
java·ide·intellij-idea
Y001112361 天前
Maven
java·maven
梦魇星虹1 天前
idea Cannot find declaration to go to
java·ide·intellij-idea
xifangge20251 天前
【故障排查】IDEA 打开 Java 文件没有运行按钮(Run)?深度解析项目标识与环境配置的 3 大底层坑点
java·ide·intellij-idea