idea启动springboot项目报错 Command line is too long 解决方法

错误:Error running ‘xxx项目’: Command line is too long. Shorten command line for xxx or also for Spring Boot default configuration.

PS:先检查Java环境变量是否设置正确,再尝试下面解决方法!

解决方案:

1.找到项目下的.idea/workspace.xml,添加一行属性(已验证可行)

1
2
3
4
<component name="PropertiesComponent">
<!-- 其它属性不改 -->
<property name="dynamic.classpath" value="true" />
</component>

2.修改设置(已验证可行)

  • 在IDEA中找到 Run-> Edit Configurations打开
    20210518104110

  • 在 Environment-> Shorten command line 的内容配置为 JAR即可解决
    20210518104142

本文链接:

https://www.hehuapei.com/idea-error-1/index.html