title: Override yml configuration in spring-boot with command line arguments not work
body: <p>I have a spring-boot application. I want to override some properties which was configuration in application.yml when executing the jar.</p>
  
  <p>My code like this:</p>
  
  <pre><code>@Service
  public class CommandService {
  
      @Value("${name:defaultName}")
      private String name;
  
      public void print() {
          System.out.println(name);
      }
  }
  </code></pre>
  
  <p>And the Application.java is</p>
  
  <pre><code>@SpringBootApplication
  public class Application implements CommandLineRunner {
  
      @Autowired
      private CommandService commandService;
  
      public static void main(String[] args) {
          SpringApplication.run(Application.class);
      }
  
      @Override
      public void run(String... args) throws Exception {
          commandService.print();
      }
  }
  </code></pre>
  
  <p>The application.yml</p>
  
  <blockquote>
    <p>name: nameInApplication</p>
  </blockquote>
  
  <p>when I excute the command like that:</p>
  
  <blockquote>
    <p>java -jar app.jar --name=nameInCommand</p>
  </blockquote>
  
  <p>It's not work</p>
  
  <p>The Second command also not work:</p>
  
  <blockquote>
    <p>java -Dname=nameInCommand2 -jar app.jar</p>
  </blockquote>
  
  <p>But if the application.yml not have config the name, the second command will work well and the first command also not work any way.</p>