Idea工程启动时报错:Command line is too long

问题

项目启动时报错Command line is too long.Shorten command line for Application or also for Spring Boot default configuration.
说是由于打印的变量太长了,超过了限制。

解决方法

1.修改workspace.xml配置

在项目/.idea/workspace.xml文件中添加一行代码如下:


  ...
   

2.修改启动项配置

启动项配置

Shorten command line 选项提供三种选项缩短类路径。

none:这是默认选项,Idea不会缩短命令行。如果命令行超出了OS限制,这个想法将无法运行您的应用程序,但是工具提示将建议配置缩短器。

JAR manifest:Idea 通过临时的classpath.jar传递长的类路径。原始类路径在MANIFEST.MF中定义为classpath.jar中的类路径属性。

classpath file:Idea将一个长类路径写入文本文件中。

这里可以选择JAR manifest保存后,再重新启动就可以了。

你可能感兴趣的:(Idea工程启动时报错:Command line is too long)