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

有时候从外部导入一个springboot项目到idea上,会出现如上图所示的、没有run按钮。

此时可以点击File-Project structure(Ctrl+Alt+Shift+S)-Modules

点击加号,如图:

然后Import Module

选择项目(要添加的项目的pom的上一层目录)-maven-next-next-finish-ok

然后就可以看到旁边多了个可以运行的,如图:

------------------------------------------------------------------------------------

记录在实习过程中遇到的坑。。

猜你喜欢

转载自blog.csdn.net/a1085578081/article/details/97893045