-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: feedback-providedFeedback has been providedFeedback has been providedtype: enhancementA general enhancementA general enhancement
Milestone
Description
With Spring Boot, you can override application properties using command line arguments like so:
java -jar my-boot.jar --my.property.name=value
This, however, fails when you try to pass an empty value:
java -jar my-boot.jar --my.property.name=
java.lang.IllegalArgumentException: Invalid argument syntax: --my.property.name=
at org.springframework.core.env.SimpleCommandLineArgsParser.parse(SimpleCommandLineArgsParser.java:75)
at org.springframework.core.env.SimpleCommandLinePropertySource.<init>(SimpleCommandLinePropertySource.java:90)
Since an empty string is a legal value for an application property, there seems to be no good reason to reject command line arguments with an empty value.
A real-world example is Kafka's ssl.endpoint.identification.algorithm
which has to be set to an empty string to disable host name verification.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: feedback-providedFeedback has been providedFeedback has been providedtype: enhancementA general enhancementA general enhancement