spring_reference/II. Getting started/11.4. Running the example.md

24 lines
934 B
Markdown
Raw Blame History

This file contains ambiguous Unicode 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.

### 11.4. 运行示例
到此我们的应用应该可以工作了。由于使用了`spring-boot-starter-parent` POM这样我们就有了一个非常有用的run目标我们可以用它启动程序。在项目根目录下输入`mvn spring-boot:run`来启动应用:
```shell
$ mvn spring-boot:run
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.3.0.BUILD-SNAPSHOT)
....... . . .
....... . . . (log output here)
....... . . .
........ Started Example in 2.222 seconds (JVM running for 6.514)
```
如果使用一个浏览器打开[localhost:8080](http://localhost:8080),你应该可以看到以下输出:
```shell
Hello World!
```
点击`ctrl-c`温雅地关闭应用程序。