项目场景: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.错误
当导入新的SpringBoot项目到IntelliJ IDEA时,遇到Errorrunning‘Application’:Commandlineistoolong的错误。原因是类路径或VM参数过多导致命令行限制。解决方法是在.idea/workspace.xml配置文件中,找到componentname=PropertiesComponent部分,添加一行<propertyname=dynamic.classpathvalue=true/>。修改后重启项目,问题得到解决,避免了命令行过长导致的启动失败。

5654

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



