64.4 Running a project in-place
To run a project in place without building a jar first you can use the “bootRun” task:
$ gradle bootRun
If devtools
has been added to your project it will automatically monitor your application for changes. Alternatively, you can also run the application so that your static classpath resources (i.e. in src/main/resources
by default) are reloadable in the live application, which can be helpful at development time.
bootRun { addResources = true }
Making static classpath resources reloadable means that bootRun
does not use the output of the processResources
task, i.e., when invoked using bootRun
, your application will use the resources in their unprocessed form.