eclipse - 如何在 Eclipse STS 中打开 Spring Boot 示例

标签 eclipse spring-boot m2eclipse

我已经下载了 Spring boot 示例,我想在 Spring STS 中运行其中之一,例如这个:

https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-boot-sample-web-jsp

但是我不知道如何将它导入 Eclipse STS。我尝试了导入向导,从文件系统导入但没有完成工作((我收到一个错误,指出在给定位置不存在任何项目)。

如何在 Eclipse STS 中运行此示例?

最佳答案

Spring Boot 使用 maven 作为构建工具,因此您可以将项目作为现有的 maven 项目导入。然后 m2e eclipse 插件将从 mavens pom.xml 文件生成 eclipse 设置。

import from file system 尝试导入现有的 eclipse 项目,但 spring boot 演示不包括 eclipse 设置,因为它们独立于 IDE

关于eclipse - 如何在 Eclipse STS 中打开 Spring Boot 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34825698/

相关文章:

Java Swing : Add resources at run time

eclipse - Nodejs 无法与 Intellij Idea 一起使用

spring - 如何将请求数据从 Spring Boot Controller 传递到 apache Camel 路由

java - 有没有办法用tomcat实现X-Robots-Tag指令?

java - java文件中的Maven版本号

java - eclipse + Maven + Tomcat : testing web apps when the WAR is built with custom options

java - LinearLayout重力

android - 还有哪些其他模拟器可以与 Eclipse 一起使用?

java - 安装第 3 方 JAR

Eclipse 显示错误,即使 maven 构建成功