11.4 運行實例程序

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

$ 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: 如果您網(wǎng)頁瀏覽器

Hello World!

To gracefully exit the application, press ctrl-c.

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

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號