项目场景:SpringBoot启动项目的时候报错Error running ‘Application’:Command line is too long
项目场景:git上下载的的新项目,第一次导入到idea中,启动的时候报错Error running ‘Application’:Command line is too long. Shorten command line for AimindWebApplication or also for Spring Boot default configuration.
问题描述
错误内容如下:Error running ‘Application’:Command line is too long. Shorten command line for AimindWebApplication or also for Spring Boot default configuration.
原因分析:
类路径太长,或者有许多VM参数,这种情况下程序就无法启动。原因是大多数操作系统都有命令行长度限制。在这种情况下,IntelliJIDEA将试图缩短类路径
解决方案:
修改 .idea/workspace.xml配置
解决方式:找到component name="PropertiesComponent"配置项,在下面添加如下行
<property name="dynamic.classpath" value="true" />
修改结果如下图:
总结:
修改配置后重启项目,再也不会提示Error running ‘Application’:Command line is too long. Shorten command line for AimindWebApplication or also for Spring Boot default configuration.错误