如何在Eclipse中运行Spring

如何在Eclipse中运行Spring

本文介绍了如何在Eclipse中运行Spring Boot Web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够在我的Eclipse(STS)中运行几个示例应用程序。
现在,我想在eclipse本身中运行一个Web应用程序。



我尝试使用示例应用程序spring-boot-sample-web-jsp


I am able to run few sample applications in my Eclipse (STS).Now, I want to run a web application within eclipse itself.

I tried with sample application "spring-boot-sample-web-jsp" given at the linkand I am able to export its war into external tomcat and run the application.Now my question is how to run a Spring Boot Web application into eclipse itself?

I really appreciate your help.

解决方案

This answer is late, but I was having the same issue. I found something that works.
In eclipse Project Explorer, right click the project name -> select "Run As" -> "Maven Build..."
In the goals, enter spring-boot:run
then click Run button.

I have STS plug-in, so on some projects I will get a "Spring Boot App" option under Run As. But, it doesn't always show up for some reason. I use the above workaround for those.
Here is a reference that explains how to run Spring boot apps:
Spring boot tutorial

这篇关于如何在Eclipse中运行Spring Boot Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 03:26