idea启动项目时报错 Command line is too long。Shorten command line for Application or also for Spring Boot default configuration.
在项目启动时,控制台第一行可以看到启动执行的命令,当命令太长超出限制时就会报这个错误。
解决方法如下:
打开项目的Configuration–Environment–Shorten command line
里面有三个选项:
-
none:默认。不缩短命令行;
-
JAR manifest:会生成一个临时的 jar 来传递类路径。
-
classpath file:会生成一个临时文件来传递类路径。