Gradle build and install the first SpringBoot project

  First you need to install and configure the JDK, Gradle environment, certainly have a JDK, as Gradle download a suitable version of the Baidu search download, unzip to a directory with the JDK (different also, it does not matter)

Then configure the system variables, as shown:

Then: win + r cmd input right-click operation to select the administrator, at the command line: gradle -v shown if the figure below, the configuration is successful environment.

 

 Then SpringBoot official website to download a program configured by the Gradle, in cmd, the root path to the download item, input

gradle build

The following figure, the first run will download dependencies, it will be relatively slow, wait for the download to finish.

After the build is successful, will appear in cmd "BUILD SUCCESSFUL", this time, in the build / libs directory of the project will have a project with jar package of the same name, you can run the project by java -jar path, as shown:

(Hereinafter the difference between a screenshot .jar suffix)

In cmd, there will be a lot of SPRING character, the last item will be prompted to start in 8080, as we enter localhost in the browser: 8080

 

Guess you like

Origin www.cnblogs.com/Mr-RanX/p/11386404.html