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:
This way we can set in IntelliJ VM Options like -Dspring.profiles.active=dev for Gradle tasks.