As described in the Spring Boot documentation, configuration can be passed via environment variables. However there are some configuration properties like spring.datasource.driver-class-name
which contain hyphens. When setting this in bash you will get an error:
$ export SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
bash: export: `SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver': not a valid identifier
This is because variables in bash must not contain hyphens. So is it even possible to set Spring configuration properties which contain hyphens via environment variables?