问题
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
若未找到,添加该组件
<component name="PropertiesComponent">
</component>
4 在该组件增加配置属性
<property name="dynamic.classpath" value="true" />
即
5 再次重启即可
原因
报错原因是命令行长度过长,导致启动失败。在使用PropertiesComponent
增加
<property name="dynamic.classpath" value="true" />
属性,即使用动态的文件路径,可以有效缩短命令行长度,解决命令行长度过长问题。
参考文献
How to configure “Shorten command line” method for whole project in IntelliJ
原创不易
转载请标明出处
如果对你有所帮助 别忘啦点赞支持哈