title: spring-way handle slash in resource name
body: <p>I have following method in controller:</p>
  
  <pre><code> @RequestMapping(value = "/items/{identifier}", method = RequestMethod.DELETE)
      public void delete(@PathVariable String identifier) {
      ... 
      // find item in database by identifier
  }
  </code></pre>
  
  <p>The problem is identifier is a <strong>String</strong> that can contain slash <strong>('/')</strong>. I.e. situation can occurs:</p>
  
  <pre><code>http://myhost/items/file:/123
  </code></pre>
  
  <p>For given URL 'identifier' must be "file:/123".</p>
  
  <p>And if there is a '/', 405 (method is not allowed) throws due to incorrect URL. </p>
  
  <p>How to tell Spring that it should take all after <strong>'/items/'</strong> as 'identifier' (resource name in REST terms)?</p>
  
  <p><strong>EDIT:</strong>
  I was told that it is client's responsibility to manage slashes and encoding, so I left it as it was.</p>
  
  <p>But for the info, based on <a href="https://stackoverflow.com/users/1231230/ankur-singhal">ankur-singhal</a> answer in comments:</p>
  
  <p>Support that I wanted to was added in Spring 4.1.0, see <a href="https://jira.spring.io/browse/SPR-11401" rel="nofollow noreferrer">this link</a> and this <a href="https://github.com/spring-projects/spring-framework/commit/426b77b83405b1b4778a96e5dc7075f553d79211" rel="nofollow noreferrer">commit</a>.
  So in my case it'll be:</p>
  
  <pre><code> @RequestMapping(value = "/items/{/identifier}", method = RequestMethod.DELETE)
  </code></pre>
  
  <p>'/' before 'identifier' did a trick.</p>