title: Spring Environment: order of systemProperties and systemEnvironment
body: <p>Is it possible to control order of resolution from Spring Environment from underlying PropertySources?</p>
  
  <p>For example.</p>
  
  <p>I have OS environment variable</p>
  
  <pre><code>ENV key=os
  </code></pre>
  
  <p>and run java with System environment variable </p>
  
  <pre><code>java -Dkey=system
  </code></pre>
  
  <p>What the output of Invoking method m on bean of class A?
  How to change order of scanning SystemEnvironmentPropertySource  or MapPropertySource [name='systemProperties']?</p>
  
  <pre><code>import org.springframework.core.env.Environment;
  import org.springframework.stereotype.Component;
  
  import javax.inject.Inject;
  
  @Component
  class A{
      @Inject
      private Environment environment;
  
      public void m(){
          System.out.println(environment.getProperty("key"));
      }
  }
  </code></pre>