一、报错信息
Error running ‘EmployeeApplication’: Command line is too long. Shorten command line for EmployeeApplication or also for Spring Boot default configuration.

二、解决方案
右键项目,选择Show in Explorer,找到 .idea/workspace.xml 文件中的 <component name= “PropertiesComponent”>,添加如下代码:
<property name="dynamic.classpath" value="true" />

此时在IDEA中重启项目就不再报错!!!
当遇到'Error running 'EmployeeApplication': Command line is too long.'的报错时,可以尝试右键项目,打开.idea/workspace.xml文件,在<component name='PropertiesComponent'>中添加<property name='dynamic.classpath' value='true'/>。完成配置后,重启IDEA项目,错误即可消除。

被折叠的 条评论
为什么被折叠?



