前言:项目启动时控制台报错:命令过长
Error running DzzwCloudZuulApplication. Command line is too long.
Shorten the command line via JAR manifest or via a classpath file and rerun.
一、修改xml的解决方案
1、打开项目所在路径下的 /.idea/workspace.xml 文件, Ctrl+F ,搜索 PropertiesComponent
2、在其中加入一行
<property name="dynamic.classpath" value="true" />
再次运行显示正常
如果在workspace.xml 中没有找到PropertiesComponent 或找到的格式不符合上上图所显示的格式,请参照后文方法进行
二、修改idea配置解决
1、点击“Edit Configurations”
2、选择左侧的启动失败的项目,点击右侧“Modify options”
3、勾选“shorten command line”
4、Shorten command line选择“JAR manifest”,点击“Apply”生效即可
运行正常