<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=nealeu" rel="nofollow">Neale Upstone</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7982?redirect=false" rel="nofollow">SPR-7982</a></strong> and commented</p>
<p dir="auto">There's a real opportunity to nail some corner cases with profiles, and conversely the risk of propagating some open-doors to bad practice.</p>
<p dir="auto">Reading the example given at <a href="http://blog.springsource.com/2011/02/11/spring-framework-3-1-m1-released/" rel="nofollow">http://blog.springsource.com/2011/02/11/spring-framework-3-1-m1-released/</a>, I can see a few areas I'd like to be explicit for fast failure:</p>
<ol dir="auto">
<li>To be able to define valid (/invalid) profile combinations. In your example, you can specify "production,dev", which is clearly not what is intended, and all too easy to do when profiles are less obviously exclusive.  This could be achieved by allowing profiles combinations to be specified in the application context.</li>
<li>To be able to configure specific bean definition override behaviour, by 'final' bean defs and/or by an override flag.  This could be done at the level of a bean or on the now nestable &lt;beans&gt; element.  ** This would have saved a LOT of time on the project I've recently been working on, mainly due to the number of components developed by different teams with varying levels of Spring experience **</li>
</ol>
<p dir="auto">I quite like the idea of allowing some combination of final and override as it would give expressiveness to developers intent.  <code class="notranslate">&lt;bean id='blah' override='true' ../&gt;</code> would not only clearly denote that override was intended, but also allow validation that there was already a bean to override.</p>
<p dir="auto">Either of these suggestions would prevent the 'prod,dev' profile from being bootstrapped.</p>
<p dir="auto">Examples would be:</p>
<ol dir="auto">
<li></li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;config&gt;
  &lt;profileOptions exclusive=&quot;production,dev,uat&quot;/&gt;
  &lt;profileOptions exclusive=&quot;perf,trace&quot;/&gt;
&lt;/config&gt;"><pre class="notranslate"><code class="notranslate">&lt;config&gt;
  &lt;profileOptions exclusive="production,dev,uat"/&gt;
  &lt;profileOptions exclusive="perf,trace"/&gt;
&lt;/config&gt;
</code></pre></div>
<ol start="2" dir="auto">
<li></li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;beans profile=&quot;production&quot; final=&quot;true&quot;&gt;
   ... jndi datasource bean defs
&lt;/beans&gt;
&lt;beans profile=&quot;dev&quot; final=&quot;true&quot;&gt;
   ... dev datasources
&lt;/beans&gt;"><pre class="notranslate"><code class="notranslate">&lt;beans profile="production" final="true"&gt;
   ... jndi datasource bean defs
&lt;/beans&gt;
&lt;beans profile="dev" final="true"&gt;
   ... dev datasources
&lt;/beans&gt;
</code></pre></div>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1 M1</p>
<p dir="auto"><strong>Reference URL:</strong> <a href="http://blog.springsource.com/2011/02/11/spring-framework-3-1-m1-released/#comment-185086" rel="nofollow">http://blog.springsource.com/2011/02/11/spring-framework-3-1-m1-released/#comment-185086</a></p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398111454" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12839" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12839/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12839">#12839</a> Revised support for bean definition visibility and overriding (<em><strong>"is depended on by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398113504" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13172" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13172/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13172">#13172</a> <code class="notranslate">@Bean</code>(override=true) (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398104074" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11690" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11690/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11690">#11690</a> Allow <code class="notranslate">@Bean</code> methods to override definitions in XML</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398117665" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13818" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13818/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13818">#13818</a> Provide boolean logic on bean profiles, i.e. NOT profile.</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398114754" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13370" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13370/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13370">#13370</a> Support not (!) operator for profile selection</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398093398" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10181" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10181/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10181">#10181</a> Bean Configuration Overriding</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398104986" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11829" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11829/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11829">#11829</a> Support <code class="notranslate">@Bean</code> method visibility</li>
</ul>
<p dir="auto">6 votes, 12 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=guznik" rel="nofollow">Gabriel Axel</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5991?redirect=false" rel="nofollow">SPR-5991</a></strong> and commented</p>
<p dir="auto">iBatis 3 beta 1 introduced API changes which break the existing Spring support.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 M3</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/15973/genius-spring.tar.gz" rel="nofollow">genius-spring.tar.gz</a> (<em>18.40 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/15984/ibatis3_20091206.zip" rel="nofollow">ibatis3_20091206.zip</a> (<em>20.88 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16051/ibatis3_20091229.zip" rel="nofollow">ibatis3_20091229.zip</a> (<em>14.01 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/15653/ibatis3-test.zip" rel="nofollow">ibatis3-test.zip</a> (<em>11.40 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16046/IBatisSpring.tar.gz" rel="nofollow">IBatisSpring.tar.gz</a> (<em>30.55 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16044/IBatisSpring.tar.gz" rel="nofollow">IBatisSpring.tar.gz</a> (<em>20.55 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16043/IBatisSpring.tar.gz" rel="nofollow">IBatisSpring.tar.gz</a> (<em>20.46 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16052/MapperFactoryBean_20091229.tar.gz" rel="nofollow">MapperFactoryBean_20091229.tar.gz</a> (<em>12.38 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16053/MapperFactoryBean_20091229-2.tar.gz" rel="nofollow">MapperFactoryBean_20091229-2.tar.gz</a> (<em>12.19 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16059/MapperFactoryBean_20100101.tar.gz" rel="nofollow">MapperFactoryBean_20100101.tar.gz</a> (<em>12.11 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16047/MapperFactoryBean.tar.gz" rel="nofollow">MapperFactoryBean.tar.gz</a> (<em>14.76 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16631/MybatisSpring_20100605.zip" rel="nofollow">MybatisSpring_20100605.zip</a> (<em>21.20 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16679/org.springframework.orm.ibatis3-201006100101.tar.gz" rel="nofollow">org.springframework.orm.ibatis3-201006100101.tar.gz</a> (<em>15.40 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16680/org.springframework.orm.ibatis3-201006100756.tar.gz" rel="nofollow">org.springframework.orm.ibatis3-201006100756.tar.gz</a> (<em>15.58 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16929/orm-ibatis3-2010-07-24.zip" rel="nofollow">orm-ibatis3-2010-07-24.zip</a> (<em>112.64 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16930/orm-ibatis3-2010-07-24-2nd.zip" rel="nofollow">orm-ibatis3-2010-07-24-2nd.zip</a> (<em>113.34 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/15613/SqlSessionFactoryBean.java" rel="nofollow">SqlSessionFactoryBean.java</a> (<em>1.57 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/16008/SqlSessionUtils.java" rel="nofollow">SqlSessionUtils.java</a> (<em>12.82 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398097625" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10803" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10803/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10803">#10803</a> Add support for iBatis 3 (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a href="https://jira.spring.io/browse/DATAJDBC-2" rel="nofollow">DATAJDBC-2</a> Add support for MyBatis 3</li>
</ul>
<p dir="auto">50 votes, 55 watchers</p>