title: What's the difference between -Drun.profiles and -Dspring.profiles.active on Spring?
body: <p>I'm trying to understand the difference in Spring between <code>-Drun.profiles</code> and <code>-Dspring.profiles.active</code>.</p>
  
  <p>Another <a href="https://stackoverflow.com/a/40061235/2387977">answer in SO</a> does not explain so much about the difference. </p>
  
  <p>In my tests, both of them can be used to select a profile:</p>
  
  <pre><code>mvn spring-boot:run -Drun.profiles=prod
  </code></pre>
  
  <p>or</p>
  
  <pre><code>mvn spring-boot:run -Dspring.profiles.active=prod
  </code></pre>
  
  <p>So, what's the difference?</p>