如何在Eclipse中运行Spring Boot Web应用程序? [英] How to run Spring Boot web application in Eclipse itself?

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

问题描述

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



我尝试使用示例应用程序spring-boot-sample-web-jsp 现在我的问题是如何运行Spring Boot Web应用程序到eclipse本身?



我非常感谢你的帮助。

解决方案

这个答案是迟到的,但是我也有同样的问题。我找到了一些有用的东西。

在eclipse Project Explorer中,右键单击项目名称 - >选择Run As - >Maven Build ...

在目标中,输入spring-boot:运行

然后单击运行按钮。



我有STS插件,所以在一些项目中我会得到一个春天启动应用程序选项。但是,由于某种原因,它并不总是出现。我使用上面的解决方法。

这是一个引用,说明如何运行Spring引导应用程序:

Spring引导教程


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 link and 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应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆