如何在 Eclipse STS 中打开 Spring Boot 示例
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34825698/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to open Spring Boot sample in Eclipse STS
提问by dragonfly
I've downloaded Spring boot samples, and I want to run one of them in Spring STS, for instance this one:
我已经下载了 Spring boot 示例,我想在 Spring STS 中运行其中之一,例如这个:
However I have no clue how to import it into Eclipse STS. I tried Import wizard, Import from file system but non of the work ((i get an error that no project exists at the given location).
但是我不知道如何将它导入 Eclipse STS。我尝试了导入向导,从文件系统导入,但没有完成工作((我收到一个错误,指出在给定位置不存在任何项目)。
How can I run this sample in Eclipse STS?
如何在 Eclipse STS 中运行此示例?
回答by Erik P
Spring boot uses maven as build tool, so you can import the project as existing maven project. The m2e eclipse plugin will then generate the eclipse settings from mavens pom.xml file.
Spring Boot 使用 maven 作为构建工具,因此您可以将项目作为现有的 maven 项目导入。然后,m2e eclipse 插件将从 mavens pom.xml 文件生成 eclipse 设置。
import from file system tries to import an existing eclipse project, but the spring boot demos do not include eclipse settings, as they are independent of the IDE
import from file system 尝试导入现有的 eclipse 项目,但 spring boot 演示不包括 eclipse 设置,因为它们独立于 IDE