IDEA常见错误
1:Intellij IDEA运行报Command line is too long解法
报错内容:
Error running 'ServiceStarter': Command line is too long. Shorten command line for ServiceStarter or also for Application default configuration.
解法:
修改项目下 .idea\workspace.xml,找到标签 <component name="PropertiesComponent"> , 在标签里加一行
<property name="dynamic.classpath" value="true" />
2:Idea开启Run DashBoard配置
找到.idea文件下的workspace.xml,并找到RunDashboard
<component name="RunDashboard"> <option name="ruleStates"> <list> <RuleState> <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> </RuleState> <RuleState> <option name="name" value="StatusDashboardGroupingRule" /> </RuleState> </list> </option> </component>
加入如下配置:
<option name="configurationTypes"> <set> <option value="SpringBootApplicationConfigurationType" /> </set> </option>
3、错误:找不到或无法加载主类
猜测:1,未能成功编译;
尝试:菜单---》Build---》Rebuild Prodject
结果:启动服务仍然报同样的错误
2,缓存问题;
尝试:菜单---》File---》Invalidate Caches/Restart 选择Invalidate and Restart 或者 只是Invalidate,清除掉缓存,然后Rebuild Project
结果:启动成功,问题解决
设置一下file-->project structure-->Module:
paths里面的编译路径Complier output
4、Lombok Requires Annotation Processing: Do you want to enable annotation processors?
寻求解决方法:
在网上寻求答案,方案几乎都是在 File——>Setting——>Build,Execution,Deployment——>Compiler——>Annotation Processors 中设置勾选 Enable Annotation Processing 即可。此种设置方式如下图所示
如果不行更新插件试试。