11.4 運(yùn)行實(shí)例程序

2018-08-14 15:05 更新

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: 此時(shí),您的應(yīng)用程序應(yīng)用起作用了。由于你使用了spring-boot-starter-parentPOM, 所以您可以使用一個(gè)(maven)很有用的run 目標(biāo)(goal)來啟動應(yīng)用程序。在項(xiàng)目根目錄下鍵入mvn spring-boot:run來啟動應(yīng)用程序。您應(yīng)該看到如下類似輸出:

  1. $ mvn spring-boot:run
  2. . ____ _ __ _ _
  3. /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
  4. ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
  5. \\/ ___)| |_)| | | | | || (_| | ) ) ) )
  6. ' |____| .__|_| |_|_| |_\__, | / / / /
  7. =========|_|==============|___/=/_/_/_/
  8. :: Spring Boot :: (v2.0.3.RELEASE)
  9. ....... . . .
  10. ....... . . . (log output here)
  11. ....... . . .
  12. ........ 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: 如果您網(wǎng)頁瀏覽器

  1. Hello World!

To gracefully exit the application, press ctrl-c.

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號