title: how to convert spring xml from 3.0 to 3.1 making use of beans:profile
body: <p>I have an xml in 3.0 like so:</p>
  
  <pre><code>        &lt;bean id="dataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource"&gt;
              &lt;property name="driverClassName" value="${jdbc.driverClassName}" /&gt;
              &lt;property name="url" value="${jdbc.internal.url}" /&gt;
              &lt;property name="username" value="${jdbc.internal.username}" /&gt;        
              &lt;property name="password" value="${jdbc.internal.password}"/&gt;
          &lt;/bean&gt;
  </code></pre>
  
  <p>I want to convert this to 3.1 while making use of the <code>beans:profile</code> However, when I try to change it to this:</p>
  
  <pre><code>        &lt;beans profile="dev"&gt;
            &lt;bean id="dataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource"&gt;
                &lt;property name="driverClassName" value="${jdbc.driverClassName}" /&gt;
                &lt;property name="url" value="${jdbc.internal.url}" /&gt;
                &lt;property name="username" value="${jdbc.internal.username}" /&gt;        
                &lt;property name="password" value="${jdbc.internal.password}"/&gt;
          &lt;/bean&gt;
          &lt;/beans&gt;
  </code></pre>
  
  <p>I get errors like:</p>
  
  <pre><code>Invalid content was found starting with element 'bean'. One of '{"http://www.springframework.org/schema/beans":beans}'
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>How can I make use of the <code>beans:profile</code> so that this particular bean definition only gets called when the active profile is <code>dev</code></p>
  
  <p><strong>Update</strong>
  My beans definition is:</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:mvc="http://www.springframework.org/schema/mvc"
      xmlns:context="http://www.springframework.org/schema/context"
      xsi:schemaLocation="http://www.springframework.org/schema/beans 
      http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
      http://www.springframework.org/schema/mvc
      http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
      http://www.springframework.org/schema/context
      http://www.springframework.org/schema/context/spring-context-3.1.xsd
         http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd"&gt;
  </code></pre>