<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=sandrews" rel="nofollow">Scott Andrews</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5367?redirect=false" rel="nofollow">SPR-5367</a></strong> and commented</p>
<p dir="auto">Hard coded request mapping values should take precedence over path variables.  Wild card patterns in a path are currently inferior to explicit values.  Path variables should be applied after explicit paths and before wild cards.</p>
<p dir="auto">For example:</p>
<p dir="auto"><code class="notranslate">@RequestMapping</code>(value = "/resources/new/", method = RequestMethod.GET)<br>
is currently trumped by<br>
<code class="notranslate">@RequestMapping</code>(value = "/resources/{resourceName}/", method = RequestMethod.GET)</p>
<p dir="auto"><code class="notranslate">@RequestMapping</code>(value = "/resources/new/", method = RequestMethod.GET)<br>
currently trumps<br>
<code class="notranslate">@RequestMapping</code>(value = "/resources/*/", method = RequestMethod.GET)</p>
<p dir="auto"><code class="notranslate">@RequestMapping</code>(value = "/resources/new/", method = RequestMethod.GET)<br>
should trump<br>
<code class="notranslate">@RequestMapping</code>(value = "/resources/{resourceName}/", method = RequestMethod.GET)<br>
should trump<br>
<code class="notranslate">@RequestMapping</code>(value = "/resources/*/", method = RequestMethod.GET)</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 M1</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="398092403" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10035" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10035/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10035">#10035</a> <code class="notranslate">@RequestMapping</code> best match gives wrong Controller method when using wildcards (<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="398094868" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10401" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10401/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10401">#10401</a> <code class="notranslate">@Controller</code> method order effects <code class="notranslate">@RequestMapping</code> behavior in ways not expected</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398096226" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10593" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10593/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10593">#10593</a> REOPENED -PathVariable mappings are greedy over hard coded mappings</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398107269" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12183" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12183/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12183">#12183</a> Synchronization in AnnotationMethodHandlerAdapter</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/4108927b28a00d4918e2852f09c8bde10c3fd0bb/hovercard" href="https://github.com/spring-projects/spring-framework/commit/4108927b28a00d4918e2852f09c8bde10c3fd0bb"><tt>4108927</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/c7d1d3ccb87cb46f718424a2d71c28d5fa4b004c/hovercard" href="https://github.com/spring-projects/spring-framework/commit/c7d1d3ccb87cb46f718424a2d71c28d5fa4b004c"><tt>c7d1d3c</tt></a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=john" rel="nofollow">John Newman</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3542?redirect=false" rel="nofollow">SPR-3542</a></strong> and commented</p>
<p dir="auto">Hi,</p>
<p dir="auto">given this config:</p>
<p dir="auto">&lt;bean id="parent" scope="prototype" abstract="true"&gt;<br>
&lt;property name="prop" ref="prop" /&gt;<br>
.....<br>
&lt;/bean&gt;<br>
&lt;bean id="child1" parent="parent" class="X" /&gt;<br>
&lt;bean id="child2" parent="parent" class="X" /&gt;<br>
&lt;bean id="child3" parent="parent" scope="singleton" class="X" /&gt;</p>
<p dir="auto">the prototype attribute on the abstract parent does not carry down to any child beans.  So child1 &amp; 2 here are scoped singleton, wouldn't it make sense to inherit that?  I am not sure, just throwing this out there for someone to consider.  If it does, the child beans could also override scope and the similar attributes.</p>
<p dir="auto">If it doesn't make sense, abstract="true" &amp; scope="*" should probably generate an xml error since they will be a waste of typing.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.1 M2</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="398095763" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10523" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10523/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10523">#10523</a> Method lookup facility doesn't work properly with scope defined in parent bean (<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="398175098" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/17171" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/17171/hovercard" href="https://github.com/spring-projects/spring-framework/issues/17171">#17171</a> Update documentation after SPR-3542</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/a884a407aa8a7d3c930dd560e4c03fc371f673e4/hovercard" href="https://github.com/spring-projects/spring-framework/commit/a884a407aa8a7d3c930dd560e4c03fc371f673e4"><tt>a884a40</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/d0b689127595179019831b1f117fed8b9a74c396/hovercard" href="https://github.com/spring-projects/spring-framework/commit/d0b689127595179019831b1f117fed8b9a74c396"><tt>d0b6891</tt></a></p>
<p dir="auto">8 votes, 9 watchers</p>