FYI: I am using Intellij's 'Run/Debug Configurations' tool.
I would like to pass an empty string as a property to my app via the command line:
--spring.ldap.username=
I have tried:
--spring.ldap.username= # results in parse error
--spring.ldap.username=''
--spring.ldap.username="" # results in parse error
--spring.ldap.username=\"\"
The attempts that actually parsed successfully yielded incorrect values, as demonstrated when I try to print the 'empty' Strings:
System.out.println(environment.getProperty("spring.ldap.username"));
// returns:
// ''
// ""
Setting the same property to an empty string in the application.properties file works perfectly:
spring.ldap.username=
The same print statement:
// returns:
//
// ^^ totally empty string
Is there a trick I am missing?