title: Default profile in Spring 3.1
body: <p>In my application I have beans annotated with <code>@Profile("prod")</code> and <code>@Profile("demo")</code>.
  The first one, as you can guess :), is used on beans that connect to production DB and second one annotates beans that use some fake DB (<code>HashMap</code> or whatever)- to make development faster.</p>
  
  <p>What I would like to have is default profile (<code>"prod"</code>) that will be used always if it is not overridden by "<em>something-else</em>".</p>
  
  <p>Perfect would be to have in my <code>web.xml</code>:</p>
  
  <pre><code>&lt;context-param&gt;
       &lt;param-name&gt;spring.profiles.active&lt;/param-name&gt;
       &lt;param-value&gt;prod&lt;/param-value&gt;
  &lt;/context-param&gt;
  </code></pre>
  
  <p>and then override this with <code>-Dspring.profiles.active="demo"</code> so that I could do:</p>
  
  <pre><code>mvn jetty:run -Dspring.profiles.active="demo". 
  </code></pre>
  
  <p>But sadly this is not working. Any idea how could I achive that? Setting <code>-Dspring.profiles.active="prod"</code> on all my environments  is not an option.</p>