IDEA导入spring boot 新项目后,启动时总是报“Error running 'XXApplication': Command line is too long. Shorten command line for XXApplication or also for Spring Boot default configuration.”的错误,如图:

IDEA运行新项目时报 Error running ‘XXApplication‘: Command line is too long. Shorten command line for…… 错误

那么出现此错误时,该如何解决呢??
其实也不难,首先找到项目工程里面的.idea/workspace.xml文件,然后再找到<component name="PropertiesComponent"></component>标签,标签如图所示:

IDEA运行新项目时报 Error running ‘XXApplication‘: Command line is too long. Shorten command line for…… 错误

然后再在component 标签中添加一行 <property name="dynamic.classpath" value="true" />,如图:

IDEA运行新项目时报 Error running ‘XXApplication‘: Command line is too long. Shorten command line for…… 错误

保存后,再次启动项目即可成功运行了。

相关文章:

  • 2021-05-10
  • 2021-07-03
  • 2021-06-07
  • 2022-12-23
  • 2022-01-20
  • 2021-10-15
  • 2021-09-16
猜你喜欢
  • 2022-12-23
  • 2021-10-15
  • 2021-08-02
  • 2021-04-08
  • 2021-12-14
相关资源
相似解决方案