我们idea第一次运行spring boot项目的时候可能会出现这种提示:

运行 FpyServerApplication 时出错。命令行过长。

通过 JAR 清单或通过类路径文件缩短命令行,然后重新运行

这个时候需要修改一下 项目根目录 .idea 文件夹下的 workspace.xml 文件

(1)如果是这种样式的话

 <component name="PropertiesComponent"><![CDATA[{
  "keyToString": {
    "RunOnceActivity.OpenProjectViewOnStart": "true",
    "RunOnceActivity.ShowReadmeOnStart": "true",
    "WebServerToolWindowFactoryState": "false",
    "node.js.detected.package.eslint": "true",
    "settings.editor.selected.configurable": "MavenSettings",
    "spring.configuration.checksum": "b68eddc20618f0021d9e6631a68262d2"
  }
}]]></component>

添加以下内容:

"dynamic.classpath": "true"

添加完成以后的样式:

 <component name="PropertiesComponent"><![CDATA[{
  "keyToString": {
    "RunOnceActivity.OpenProjectViewOnStart": "true",
    "RunOnceActivity.ShowReadmeOnStart": "true",
    "WebServerToolWindowFactoryState": "false",
    "node.js.detected.package.eslint": "true",
    "settings.editor.selected.configurable": "MavenSettings",
    "spring.configuration.checksum": "b68eddc20618f0021d9e6631a68262d2",
    "dynamic.classpath": "true"
  }
}]]></component>

(2)如果是这种样式的话

 <component name="PropertiesComponent">
    <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
    <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
    <property name="settings.editor.selected.configurable" value="project.propCompiler" />
  </component>

添加一行代码:

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

添加完以后的展示效果:

  <component name="PropertiesComponent">
    <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
    <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
    <property name="settings.editor.selected.configurable" value="project.propCompiler" />
    <property name="dynamic.classpath" value="true" />
  </component>

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐