问题描述: 在单元测试或者单独启动测试类时候报错: Command line is too long. Shorten command line for XXXTest.某方法 or also for JUnit default configuration? 解决方案: 1.找到.idea文件夹,找到workspace.xml文件 2.检索到component 标签中, name="PropertiesComponent"的标签 在标签里加以下的一个句子,完美解决! <property name="dynamic.classpath" value="true" />