1、找到workspace.xml项目所在的磁盘路径
.idea->workspace.xml
打开该配置文件找到< component name=“RunDashboard”>< /component >
在component标签里面加入以下代码
<option name="configurationTypes">
<set>
<option value="SpringBootApplicationConfigurationType" />
</set>
</option>
重启Idea=====成功
关闭自然就相反了。