导入springboot/其他项目到Idea时main方法没有运行按钮解决方案
有时候从外部导入一个springboot项目到idea上,会出现如上图所示的、没有run按钮。
 

此时可以点击File-Project structure(Ctrl+Alt+Shift+S)-Modules
点击加号,如图:

导入springboot/其他项目到Idea时main方法没有运行按钮解决方案

然后Import Module

导入springboot/其他项目到Idea时main方法没有运行按钮解决方案
选择项目(要添加的项目的pom的上一层目录)-maven-next-next-finish-ok
然后就可以看到旁边多了个可以运行的,如图:

导入springboot/其他项目到Idea时main方法没有运行按钮解决方案
特别的注意如下文件颜色:

导入springboot/其他项目到Idea时main方法没有运行按钮解决方案

相关文章:

  • 2022-01-22
  • 2021-06-08
  • 2021-07-07
  • 2021-06-13
  • 2021-05-20
  • 2023-03-19
猜你喜欢
  • 2021-10-19
  • 2022-12-23
  • 2021-12-11
  • 2021-10-05
  • 2021-06-14
  • 2021-11-19
  • 2021-10-15
相关资源
相似解决方案