2023. 6. 11. 12:22ㆍ카테고리 없음
When you download and unarchive the demo project from https://start.spring.io, there is an executable shell script called gradlew on MacOS. Even though, the Spring Quickstart Guide asks readers to type gradlew bootRun to start your Spring Boot application. I wonder how to list gradle commands for this project.
The command gradlew tasks gives you a list of the main tasks of the selected project like the following scrreenshot.

Before running the demo project, you need to write some code. It's a simple example program that acceps a GET request from a client and return Hello something! to the client.

Once you write your code, then type ./gradlew boot run, you can boot up your Spring Boot application with a lot of messages. You can see the w.s.c.ServletWebServerApplicationContext and o.s.b.w.embedded.tomcat.TomcatSebServer. It shows the domain and port number where you can access your web application on a browser.

Here is the result of your first Spring Boot web application.

Last but not least, Gradle is an open-source build automation tool flexible enough to build almost any type of software. Another popular tools are Maven and Ant, but Gradle is the most popular. Therefore, use Gradle.