11.4 运行实例程序
At this point, your application should work. Since you used the spring-boot-starter-parent
POM, you have a useful run
goal that you can use to start the application. Type mvn spring-boot:run
from the root project directory to start the application. You should see output similar to the following:
此时,您的应用程序应用起作用了。由于你使用了spring-boot-starter-parent
POM, 所以您可以使用一个(maven)很有用的run
目标(goal)来启动应用程序。在项目根目录下键入mvn spring-boot:run
来启动应用程序。您应该看到如下类似输出:
$ mvn spring-boot:run
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.3.RELEASE)
....... . . .
....... . . . (log output here)
....... . . .
........ Started Example in 2.222 seconds (JVM running for 6.514)
If you open a web browser to localhost:8080
, you should see the following output:
如果您网页浏览器
Hello World!
To gracefully exit the application, press ctrl-c
.
更多建议: