刚拉下来项目,初次启动时报错:error running ‘demotest.test2’: command line is too long. shorten command line for demotest.test2 or also for junit default configurationalso for Application default configuration.
起初我编辑了WebApplication的环境:

配置完成后WebApplication就可以正常启动了。
但在我启动自写的测试方法时又报同样的错误,接下来我更改了文件目录下.idea文件夹下的workspace.xml文件:
找到<component name="PropertiesComponent">标签,在其中增添:
<property name="dynamic.classpath" value="true" />
即可。
如下图:
接下来就可以正常启动啦
本文分享了如何处理项目启动时'command line too long'的错误,通过编辑WebApplication环境和workspace.xml中'PropertiesComponent'的动态classpath属性,成功解决了自定义测试方法启动问题。
5605

被折叠的 条评论
为什么被折叠?



