title: Spring Boot CommandLineRunner : filter option argument
body: <p>Considering a Spring Boot <code>CommandLineRunner</code> Application, I would like to know how to filter the "switch" options passed to Spring Boot as externalized configuration.</p>
  
  <p>For example, with:</p>
  
  <pre><code>@Component
  public class FileProcessingCommandLine implements CommandLineRunner {
      @Override
      public void run(String... strings) throws Exception {
          for (String filename: strings) {
             File file = new File(filename);
             service.doSomething(file);
          }
      }
  }
  </code></pre>
  
  <p>I can call <code>java -jar myJar.jar /tmp/file1 /tmp/file2</code> and the service will be called for both files.</p>
  
  <p>But if I add a Spring parameter, like <code>java -jar myJar.jar /tmp/file1 /tmp/file2 --spring.config.name=myproject</code> then the configuration name is updated (right!) but the service is also called for file <code>./--spring.config.name=myproject</code> which of course doesn't exist.</p>
  
  <p>I know I can filter manually on the filename with something like</p>
  
  <pre><code>if (!filename.startsWith("--")) ...
  </code></pre>
  
  <p>But as all of this components came from Spring, I wonder if there is not a option somewhere to let it manage it, and to ensure the <code>strings</code> parameter passed to the <code>run</code> method will not contain at all the properties options already parsed at the Application level.</p>