Pass system properties down to Springboot in IntelliJ and Gradle

The most straight forward way to pass down Springboot config settings while developing to Gradle tasks is by environment variable (at least for me). E.g.:


Since IntelliJ does not allow passing environment variables down to Gradle tasks this does not work there. Thanks to Gradle we can make system properties available for tasks:

bootRun.systemProperties =

This way we can set in IntelliJ VM Options like for Gradle tasks.