To run a Spring Boot application using Gradle, you can use the bootRun
task provided by the org.springframework.boot:spring-boot-gradle-plugin
plugin.
Here's an example of how you can use the bootRun
task in your Gradle build file:
apply plugin: 'org.springframework.boot' bootRun { // optional configuration options }
With this configuration in place, you can then run the bootRun
task from the command line:
gradle bootRun
This will start the application using the default settings and will make it available at the default port (usually 8080).
You can also customize the bootRun
task by setting various options, such as the main class to run, the classpath to use, and the arguments to pass to the application.
For more information about the bootRun
task and the options that it supports, you can refer to the Spring Boot Gradle plugin documentation.