title: SpringBoot Passing parameter to CommandLineRunner
body: <p>I'm using <code>SpringBoot 2.1.3</code> and I'm trying to passing a number of parameters through command line.</p>
  
  <p>Here is the <code>main</code> class:</p>
  
  <pre><code>@SpringBootApplication
  @Slf4j
  public class Application implements CommandLineRunner {
  
  @Value("${priceOne.pound}")
  private Integer p1pound;
  
  @Value("${priceOne.shilling}")
  private Integer p1shilling;
  
  @Value("${priceOne.pences}")
  private Integer p1pences;
  
  @Value("${priceTwo.pound}")
  private Integer p2pound;
  
  @Value("${priceTwo.shilling}")
  private Integer p2shilling;
  
  @Value("${priceTwo.pences}")
  private Integer p2pences;
  
  @Value("${factor}")
  private Integer factor;
  
  @Value("${op}")
  private String op;
  
  public static void main(String[] args) {
      SpringApplication.run(EurisApplication.class, args);
  }
  
  @Override
  public void run(String... args) {
      Price priceOne = new Price(p1pound, p1shilling, p1pences);
      Price priceTwo = new Price(p2pound, p2shilling, p2pences);
      ....
      ....
  }
  </code></pre>
  
  <p>I tried to fill those variables with:</p>
  
  <pre><code>spring-boot:run -Drun.arguments=--priceOne.pound=5, --priceOne.shilling=5, --priceOne.pences=5, --priceTwo.pound=5, --priceTwo.shilling=5, --priceTwo.pences=5, --factor=0, --op=+
  </code></pre>
  
  <p>or with:</p>
  
  <pre><code>spring-boot:run -Dspring-boot.run.arguments=--priceOne.pound=5, --priceOne.shilling=5, --priceOne.pences=5, --priceTwo.pound=5, --priceTwo.shilling=5, --priceTwo.pences=5, --factor=0, --op=+
  </code></pre>
  
  <p>if I add quotes <code>" "</code> at the beginning and at the end of the parameters list I obtain a conversion error..</p>
  
  <p>Can you help me?</p>
  
  <p>Thanks a lot.</p>
  
  <hr>
  
  <p>Thanks for your replies!</p>
  
  <p>if I remove all the parameters eccept the first and I launch the application with:</p>
  
  <pre><code> spring-boot:run -Dspring-boot.run.arguments=--priceOne.pound=5
  </code></pre>
  
  <p>Works fine. Other ways you mentioned as:</p>
  
  <pre><code> spring-boot:run --priceOne.pound=5
  </code></pre>
  
  <p>retrieve a parsing exception both with one parameter and with many. I'm a little bit confused..</p>
  
  <p>it took me less time to write the whole application than to write that damned <code>commandLine</code> launch. I can't get all the parameters as a single <code>String</code>.. I don't understand why with just one parameter works and with two not!</p>
  
  <p>Thanks</p>