How to add JVM options to program started by mvn spring-boot:run
You can configure spring-boot-maven-plugin
to always include you jvm options when run:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>
-Dapp.name=test
</jvmArguments>
</configuration>
</plugin>
Or if you don't need that arguments to stay permanently, use this on the command line:
mvn spring-boot:run -Drun.jvmArguments="..."
Check documentation for details.