When I launch a task using the shell, I can't seem to use spaces within a property for my boot application.
task launch my-task --arguments "--app.username=alpha beta gamma"
When my code prints out the value of username
, it is alpha
and not alpha beta gamma
.
My Spring configuration code looks like the following:
@ConfigurationProperties("app")
public class CustomTaskProperties {
private String username;
... getters and setters ...
}
You can escape whitespaces by adding single quotes around the property value
Try this:
task launch my-task --arguments "--app.username='alpha beta gamma'"