完整报错:Error running 'Application': Command line is too long. Shorten command line for Application or also for Spring Boot default configuration.
解决办法,找到.idea下面的workspace.xml
找到里面的PropertiesComponent,添加<property name="dynamic.classpath" value="true" />即可:
<component name="PropertiesComponent">
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="settings.editor.selected.configurable" value="MavenSettings" />
//添加
<property name="dynamic.classpath" value="true" />
</component>
原因:IDEA启动项目的时候是使用命令启动的。启动命令会输出在日志控制台的第一行,双击可展开显示全部命令。这个命令特别长,在windows系统中当超过32767个字符,就会报错!
启动命令如下,截取了一部分,它很长!!!