|
|
|
@ -42,6 +42,22 @@ include::../gradle/running/application-plugin-main-class-name.gradle[tags=main-c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[running-your-application-passing-arguments]]
|
|
|
|
|
=== Passing arguments to your application
|
|
|
|
|
Like all `JavaExec` tasks, arguments can be passed into `bootRun` from the command line
|
|
|
|
|
using `--args='<arguments'>` when using Gradle 4.9 or later. For example, to run your
|
|
|
|
|
application with a profile named `dev` active the following command can be used:
|
|
|
|
|
|
|
|
|
|
[source,bash,indent=0,subs="verbatim"]
|
|
|
|
|
----
|
|
|
|
|
$ ./gradlew bootRun --args='--spring.profiles.active=dev'
|
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
See {gradle-api}/org/gradle/api/tasks/JavaExec.html#setArgsString-java.lang.String-[the
|
|
|
|
|
javadoc for `JavaExec.setArgsString`] for further details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[running-your-application-reloading-resources]]
|
|
|
|
|
=== Reloading resources
|
|
|
|
|
If devtools has been added to your project it will automatically monitor your
|
|
|
|
|