我能够在我的 Eclipse (STS) 中运行几个示例应用程序。 现在,我想在 Eclipse 中运行一个 Web 应用程序。
我尝试使用 link 中给出的示例应用程序“spring-boot-sample-web-jsp” 我能够将其 war 导出到外部 tomcat 并运行应用程序。 现在我的问题是如何在 eclipse 中运行 Spring Boot Web 应用程序?
最佳答案
这个答案很晚,但我遇到了同样的问题。我发现了一些有用的东西。
在eclipse Project Explorer中,右键项目名称->选择“Run As”->“Maven Build...”
在目标中,输入 spring-boot:run
然后点击运行按钮。
我有 STS 插件(即 SpringSource Tool Suite),所以在某些项目中,我会在 Run As 下获得“Spring Boot App”选项。但是,由于某种原因,它并不总是出现。我使用上述解决方法。
这是解释如何运行 Spring Boot 应用程序的引用:
Spring boot tutorial
关于java - 如何在 Eclipse 本身中运行 Spring Boot Web 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23677808/