Command line is too long. Shorten command line for Application or also forSpring Boot default config

- 日理万妓 2023-09-24 16:20 141阅读 0赞

问题

Command line is too long. Shorten command line for Application or also forSpring Boot default config

详细问题

IDEA运行代码,报错,具体报错内容如下
请添加图片描述

解决方案

1 全局搜索(Ctrl+Shift+N按文件名搜索 点击右上角搜索,选择File搜索文件)
在这里插入图片描述
2 搜索workspace.xml文件
在这里插入图片描述
点击或Enter进入该文件
3 在workspace.xml搜索组件名PropertiesComponent
在这里插入图片描述
若未找到,添加该组件

  1. <component name="PropertiesComponent">
  2. </component>

4 在该组件增加配置属性

  1. <property name="dynamic.classpath" value="true" />


在这里插入图片描述
5 再次重启即可

原因

报错原因是命令行长度过长,导致启动失败。在使用PropertiesComponent增加

  1. <property name="dynamic.classpath" value="true" />

属性,即使用动态的文件路径,可以有效缩短命令行长度,解决命令行长度过长问题。

参考文献

How to configure “Shorten command line” method for whole project in IntelliJ

原创不易
转载请标明出处
如果对你有所帮助 别忘啦点赞支持哈
在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,141人围观)

还没有评论,来说两句吧...

相关阅读