EnvFile
EnvFile copied to clipboard
Environment variable does get resolves in 'VM Options' in 'Configuration'
Defined variable in file
DATASOURCE_CONF=-Dspring.datasource.url=jdbc:mysql://localhost:3306/TEST_DATABASE -Dspring.datasource.username=test -Dspring.datasource.password=test -Dhibernate.dialect=org.hibernate.dialect.MySQLDialect
added file in configuration
This variable is not getting resolved in VM Options
Does it work if you set environment variables via native IDE UI in the Configuration
tab?
I'm afraid it might be a limitation that we cannot do anything about in the same way as it was in https://github.com/ashald/EnvFile/issues/78#issuecomment-486115324.
If I had to offer an alternative, I'd suggest trying setting those values via JAVA_OPTS
environment variable.
Yes, it worked very well after declaring into "Environment variables" in the "Configuration tab". I just have to change ${DATASOURCE_CONF} to $DATASOURCE_CONF$ In my point of view, EnvFile should act as a Decorator over the "Environment Variables" functionality. Everything offered by "Environment variables" plus the additional feature of easily managing variable via file etc. @ashald What do you think?
I think that's a great idea but unfortunately that is not something that is possible to implement with current APIs exposed by JetBrains IDEs. 😞