To run a Spring Boot application, there are two gradle tasks:
gradle bootRun
gradle run
Both tasks can be used to run the Spring Boot application, what are the main differences between these tasks?
The Spring Boot gradle plugin provides the bootRun task that allows a developer to start the application in a “developer mode” without first building a JAR file and then starting this JAR file. Thus, it's a quick way to test the latest changes you made to the codebase.
For the maven command is mvn spring-boot:run and for the Gradle command is gradle bootRun but make for your Maven and Gradle is configured properly. Both the tools download dependency first (if not available in the local repo) and after that compile the application class and then run the application.
gradle bootRun
- standard gradle'run' task with additional Spring Boot features. e.g. you can type: bootRun {addResources = false}
check github gradle run
standard gradle 'run' taskIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With