【解决】Command line is too long. Shorten the command line xxx

问题描述

使用Idea运行项目在项目启动时报错:

Command line is too long. Shorten command line for XXXApplication or also for Spring Boot default configuration.

问题分析

这种异常的出现是因为运行项目的指令过长引起的,在IDEA进行代码运行时加载了很多指令,这些指令拼接后的长度超出了系统的最大长度,当你的命令行长度超过 32768 个字符时,idea就会提示你使用短一点的命令行。

解决方案

修改工作空间,路径:.idea --> workspace.xml

找到标签,在标签里添加一行:

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

猜你喜欢

转载自blog.csdn.net/A_captain_608/article/details/129242349