spring_reference/III. Using Spring Boot/19.1. Running from an IDE.md

8 lines
898 B
Markdown
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 19.1. 从IDE中运行
你可以从IDE中运行Spring Boot应用就像一个简单的Java应用但是你首先需要导入项目。导入步骤跟你的IDE和构建系统有关。大多数IDEs能够直接导入Maven项目例如Eclipse用户可以选择`File`菜单的`Import…` --> `Existing Maven Projects`
如果不能直接将项目导入IDE你可以需要使用构建系统生成IDE元数据。Maven有针对[Eclipse](http://maven.apache.org/plugins/maven-eclipse-plugin/)和[IDEA](http://maven.apache.org/plugins/maven-idea-plugin/)的插件Gradle为[各种IDEs](http://www.gradle.org/docs/current/userguide/ide_support.html)提供插件。
**注**如果意外地运行一个web应用两次你将看到一个"端口已在使用中"错误。为了确保任何存在的实例是关闭的STS用户可以使用`Relaunch`按钮而不是`Run`按钮。