Launching an application using Gradle

Typically, the very first step of creating any application is to have a basic skeleton, which can be immediately launched as is. As the Spring Boot starter has created the application template for us already, all we have to do is extract the code, build, and execute it. Now let's go to the console and launch the app with Gradle.

How to do it…

  1. Change in the directory where the bookpub.zip archive was extracted from and execute the following command from the command line:
    $ ./gradlew clean bootRun
    

Tip

If you don't have gradlew in the directory, then download a version of Gradle from https://gradle.org/downloads or install it via homebrew by executing brew install gradle. After Gradle is installed, run gradle wrapper ...

Get Spring Boot Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.