forked from spring-projects/spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document spring-boot.run.arguments behaviour with multiple arguments
Closes spring-projectsgh-19998
- Loading branch information
Showing
4 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...ect/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-arguments.apt.vm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
----- | ||
Using Application Arguments | ||
----- | ||
Stephane Nicoll | ||
----- | ||
2020-02-11 | ||
----- | ||
|
||
Application arguments can be specified using <<<arguments>>>. The following sets two | ||
arguments: <<<property1>>> and <<<property2=42>>>: | ||
|
||
--- | ||
<project> | ||
... | ||
<build> | ||
<properties> | ||
<my.value>42</my.value> | ||
</properties> | ||
... | ||
<plugins> | ||
... | ||
<plugin> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>${project.artifactId}</artifactId> | ||
<version>${project.version}</version> | ||
<configuration> | ||
<arguments> | ||
<argument>property1</argument> | ||
<argument>property2=${my.value}</argument> | ||
</arguments> | ||
</configuration> | ||
... | ||
</plugin> | ||
... | ||
</plugins> | ||
... | ||
</build> | ||
... | ||
</project> | ||
--- | ||
|
||
On the command-line, arguments are separated by a space the same way <<<jvmArguments>>> | ||
are. If an argument contains a space, make sure to quote it. In the following example, | ||
two arguments are available: <<<property1>>> and <<<property2=Hello World>>>: | ||
|
||
--- | ||
mvn spring-boot:run -Dspring-boot.run.arguments="property1 'property2=Hello World'" | ||
--- | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters