Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between "gradle bootRun" and "gradle run" to run a springboot application?

To run a Spring Boot application, there are two gradle tasks:

  1. gradle bootRun
  2. gradle run

Both tasks can be used to run the Spring Boot application, what are the main differences between these tasks?

like image 373
Sanchit Avatar asked May 20 '16 05:05

Sanchit


People also ask

What does Gradle bootRun do?

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.

What is Gradle command to run a spring boot executable app?

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.


1 Answers

  1. gradle bootRun - standard gradle'run' task with additional Spring Boot features. e.g. you can type: bootRun {addResources = false}check github
  2. gradle run standard gradle 'run' task
like image 50
sQer Avatar answered Sep 24 '22 04:09

sQer