Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
53372d5f
Commit
53372d5f
authored
Sep 06, 2018
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document the use of --args to pass arguments to bootRun
Closes gh-1176
parent
ff8b8c55
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
index.adoc
...ls/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc
+1
-0
running.adoc
.../spring-boot-gradle-plugin/src/main/asciidoc/running.adoc
+16
-0
No files found.
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc
View file @
53372d5f
...
@@ -11,6 +11,7 @@ Andy Wilkinson
...
@@ -11,6 +11,7 @@ Andy Wilkinson
:dependency-management-plugin-documentation: {dependency-management-plugin}/blob/master/README.md
:dependency-management-plugin-documentation: {dependency-management-plugin}/blob/master/README.md
:gradle-userguide: https://docs.gradle.org/current/userguide
:gradle-userguide: https://docs.gradle.org/current/userguide
:gradle-dsl: https://docs.gradle.org/current/dsl
:gradle-dsl: https://docs.gradle.org/current/dsl
:gradle-api: https://docs.gradle.org/current/javadoc
:application-plugin: {gradle-userguide}/application_plugin.html
:application-plugin: {gradle-userguide}/application_plugin.html
:groovy-plugin: {gradle-userguide}/groovy_plugin.html
:groovy-plugin: {gradle-userguide}/groovy_plugin.html
:java-plugin: {gradle-userguide}/java_plugin.html
:java-plugin: {gradle-userguide}/java_plugin.html
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/running.adoc
View file @
53372d5f
...
@@ -42,6 +42,22 @@ include::../gradle/running/application-plugin-main-class-name.gradle[tags=main-c
...
@@ -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]]
[[running-your-application-reloading-resources]]
=== Reloading resources
=== Reloading resources
If devtools has been added to your project it will automatically monitor your
If devtools has been added to your project it will automatically monitor your
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment