Closed
Description
Currently environment variables get bound to @Configuration
properties directly (for example SERVER_PORT
to Server.port
). This can cause problems when trying to set ignoreInvalidFields
or if you want to run two different boot apps as the same user.
@gregturn suggested that we consider supporting a prefix when binding. For example:
springApplication.setEnvironmentPrefix("MYAPP_");
...
Which would then bind MYAPP_SERVER_PORT
rather than SERVER_PORT
.