java项目启动异常Command line is too long问题及解决
作者:Arvin.Wang
Java Spring项目启动时报错“Command line is too long”,可以通过修改项目配置或在IDEA的workspace.xml文件中添加相关设置来解决
java spring 项目启动时报错
Command line is too long. Shorten command line for xxxApplication or also for Spring Boot default configuration.

这是命令行长度造成的错误,可以通过修改项目的命令行启动方式来解决:
方案一
1、打开项目配置:

2、在打开的配置窗口中选中启动时报错的项目:

3、将项目的 Shorten command line 修改为 classpath file

4、点击 OK 按钮,保存设置
5、重新启动项目,此时项目可以正常启动
方案二
在 .idea 的配置文件 workspace.xml 的 PropertiesComponent 中添加:
<property name="dynamic.classpath" value="true" />

总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
