Intellij IDEA开发环境中Springboot项目无Run ****main()的菜单

问题描述:

  Intellij  IDEA开发环境中Springboot项目无Run ****main()的菜单。

解决办法有以下几种:

  方法1:Idea无右键run选项, 无法通过main方法启动springboot项目

  方法2:IDEA spring-boot application右键没有run

  方法3:idea右键没有run选项,无法运行main方法及启动springboot工程

  如果以上方法都不能立即生效,则可以尝试关闭IDEA,再重新加载Springboot项目,继续按正常步骤部署、运行和浏览器端测试即可。

  实在不行,可以尝试将Springboot项目打成jar包,然后用java -jar 项目名.jar 作为服务运行,并进行浏览器端测试。

原文地址:https://www.cnblogs.com/rainbow70626/p/14328156.html