I need to pass multiple arguments to maven command line to run a spring boot application. This is how I was passing command line arguments in spring boot. I am using spring boot 2.2.6 Release
mvn spring-boot:run -Dspring-boot.run.arguments="--server.port=8999,--spring.application.instance_id=dhn"
However I get the following error
nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'server.port' to java.lang.Integer
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'server.port' to java.lang.Integer:
Property: server.port
Value: 8999,--spring.application.instance_id=dhn
Origin: "server.port" from property source "commandLineArgs"
Reason: failed to convert java.lang.String to java.lang.Integer
Action:
Update your application's configuration
Seems like the arguments are not parsed correctly