java:idea跑单测报错提示Command line is too long

1 背景

新拉下的项目代码,在idea中运行单测时抛错提示:Command line is too long。

2 解决方式

修改项目下,.idea/workspace.xml:

在这里插入图片描述
搜索标签:

<component name="PropertiesComponent">

修改如下(在标签内最后一行添加上< property name=“dynamic.classpath” value=“true” />):

<component name="PropertiesComponent">
  <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
  <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
  <property name="dynamic.classpath" value="true" />
</component>

在这里插入图片描述

Logo

一站式 AI 云服务平台

更多推荐