Solve the error running xxxApplication Command line is too long when Intellij IDEA compiles and runs

created at 09-06-2021 views: 23

Idea reported an error when compiling the project, and the saved information is as follows:

15:42   Error running 'xxxxApplication': Command line is too long. Shorten command line for xxxxApplication or also for Spring Boot default configuration.

Solution 1

Found in the project folder/.idea/workspace.xml

<component name="PropertiesComponent">

Then add a line of attributes to it to solve:

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

Solution 2

Open the running configuration of the program and change the Shorten command line to JAR manifest or  classpath file, as shown in the figure:


JAR manifest or  classpath file

created at:09-06-2021
edited at: 09-06-2021: