微服务启动不成功,报Error running OrderServiceBoot. Command line is too long. Shorten the command line via JAR manifest or via a classpath file and rerun.
解决:
方法一:
右上角启动小三角 -->Edit configuration–>-右侧Modify options----> Shorten command line 选项打钩 --> 选择 classpath file或JAR manifest 选项 --> 重新启动工程运行即可。

方法二:
1.首先找到 .idea/libraies/workspace.xml 中的 <component name="PropertiesComponent">

2.在该组件中添加代码为:<property name="dynamic.classpath" value="true" />

本文介绍了如何解决微服务启动时因命令行过长而失败的问题,提供了两种方法:一是通过修改IDE配置缩短命令行,二是修改.workspace.xml文件中的PropertiesComponent。
8714





