<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=joerg.heinicke@gmx.de" rel="nofollow">Jörg Heinicke</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3308?redirect=false" rel="nofollow">SPR-3308</a></strong> and commented</p>
<p dir="auto">The current reference at <a href="http://www.springframework.org/docs/reference/beans.html#beans-factory-scopes-other-injection-proxies" rel="nofollow">http://www.springframework.org/docs/reference/beans.html#beans-factory-scopes-other-injection-proxies</a> has a duplicate attribute proxy-target-class:</p>
<p dir="auto">&lt;bean id="userPreferences" class="com.foo.DefaultUserPreferences" scope="session"&gt;<br>
&lt;aop:scoped-proxy proxy-target-class="false" proxy-target-class="false"/&gt;<br>
&lt;/bean&gt;</p>
<p dir="auto">This is of course not well-formed XML.</p>
<p dir="auto">Jörg</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.3</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=dagi" rel="nofollow">Roman Pichlík</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5574?redirect=false" rel="nofollow">SPR-5574</a></strong> and commented</p>
<p dir="auto">Let suppose that there are beans of a given type T and these beans are marked by interface Ordered or annotation Order. It does make really sense to preserve their order according to Ordered/Order marker if they are collected. See following code for illustration.</p>
<p dir="auto"><code class="notranslate">@Component</code><br>
<code class="notranslate">@Order</code>(value=1)<br>
public class BusinessServiceA implements BusinessService{}</p>
<p dir="auto"><code class="notranslate">@Component</code><br>
<code class="notranslate">@Order</code>(value=2)<br>
public class BusinessServiceB implements BusinessService{}</p>
<p dir="auto"><code class="notranslate">@Component</code><br>
public class ServiceRegistry {<br>
<code class="notranslate">@Autowired</code><br>
public List&lt;BusinessService&gt; services;<br>
}</p>
<p dir="auto">assertThat(services.get(0).getClass(), is(BusinessServiceA.class));<br>
assertThat(services.get(1).getClass(), is(BusinessServiceB.class));</p>
<hr>
<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="398098543" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10921" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10921/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10921">#10921</a> Allow to define autowired collections and array elements order (<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="398219022" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/20761" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/20761/hovercard" href="https://github.com/spring-projects/spring-framework/issues/20761">#20761</a> Document common use cases for <code class="notranslate">@Order</code> vs <code class="notranslate">@Priority</code> vs <code class="notranslate">@DependsOn</code></li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/4a9af233aeba965fa1e9fe0601a34fd42a08c3dc/hovercard" href="https://github.com/spring-projects/spring-framework/commit/4a9af233aeba965fa1e9fe0601a34fd42a08c3dc"><tt>4a9af23</tt></a></p>
<p dir="auto">15 votes, 15 watchers</p>