<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=sreddy" rel="nofollow">Satyapal Reddy</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9038?redirect=false" rel="nofollow">SPR-9038</a></strong> and commented</p>
<p dir="auto">(I discussed this with Andy Clement on email)</p>
<p dir="auto">We want to use a set of static methods declared on set of classes to be used as part of the expression evaluation. These methods are not declared on the rootObject being passed to Expression.getValue method.</p>
<p dir="auto">One solution is to add our own MethodResolver to the list of resolvers on the StandardEvaluationContext. However doing that involves pretty much replicating the entire code of ReflectiveMethodResolver (except where we get methods from type) and then since compareArguments and compareArgumentsVarargs methods on ReflectionHelper are not public and also ReflectiveMethodExecutor class is not public, we need to duplicate lot of code.</p>
<p dir="auto">However if ReflectiveMethodResolver could call a protected method getMethods(type), a subclass could just override it and provide its own static methods.</p>
<p dir="auto">I am attaching the updated class as well as a Junit test case.</p>
<p dir="auto">As we are using 3.0.5 version a backport would be great.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.5</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/19321/ReflectiveMethodResolver.java" rel="nofollow">ReflectiveMethodResolver.java</a> (<em>6.18 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/19322/SpELTest.java" rel="nofollow">SpELTest.java</a> (<em>1.97 kB</em>)</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/90bed9718f17bfd8f3d9dbe6cd2b3cf7ed2e6573/hovercard" href="https://github.com/spring-projects/spring-framework/commit/90bed9718f17bfd8f3d9dbe6cd2b3cf7ed2e6573"><tt>90bed97</tt></a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=mdesrosiers" rel="nofollow">Martin Desrosiers</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6231?redirect=false" rel="nofollow">SPR-6231</a></strong> and commented</p>
<p dir="auto">The change made in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398093573" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10208" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10208/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10208">#10208</a> effectively strips any file extension in GET requests in order to exclude it from the path variable value. Unfortunately, this prevents queries that contains dots as part of the path variable, i.e. an email address. Therefore the following request:</p>
<p dir="auto"><a href="http://localhost:8080/rest/emailaddress/email/test%40mail.com" rel="nofollow">http://localhost:8080/rest/emailaddress/email/test%40mail.com</a></p>
<p dir="auto">with the following controller request mapping:</p>
<p dir="auto"><code class="notranslate">@RequestMapping</code>(value = "/email/{email}", method = RequestMethod.GET)<br>
public ModelAndView getEmail(<code class="notranslate">@PathVariable</code>("email") final String email) {<br>
}</p>
<p dir="auto">will map the value "test@mail" to the variable email.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 RC1</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="398097808" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10832" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10832/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10832">#10832</a> a Uri Value is incorrectly extracted if it contains '.'. (<em><strong>"duplicates"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398093573" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10208" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10208/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10208">#10208</a> ReSTful URLs with content type extension do not work properly</li>
</ul>