title: @PathVariable in SpringBoot with slashes in URL
body: <p>I have to get params from URL using @PathValiable in SpringBoot application. These params often have <strong>slashes</strong>. I don't have a control about what a user would enter in URL so I would like to get what he has entered and then I can handle with it.</p>
  
  <p><strong>I have already looked through materials and answers here, I don't think that for me the good solution is to ask users somehow encode the entering params.</strong></p>
  
  <p>The SpringBoot code is simple:  </p>
  
  <pre><code>@RequestMapping("/modules/{moduleName}")
  @ResponseBody
  public String moduleStrings (@PathVariable("moduleName") String moduleName) throws Exception {
  
    ...
  
  }
  </code></pre>
  
  <p>So the URL for example would be the following:</p>
  
  <pre><code>http://localhost:3000/modules/...
  </code></pre>
  
  <p>The issue is that the param <strong>moduleName</strong> often has slashes. 
  For example, </p>
  
  <pre><code>metadata-api\cb-metadata-services OR
  app-customization-service-impl\\modules\\expand-link-schemes\\common\\app-customization-service-api
  </code></pre>
  
  <p>So a user definetely can enter:</p>
  
  <pre><code>http://localhost:3000/modules/metadata-api\cb-metadata-services
  </code></pre>
  
  <p>Is this possible to get everything what a user has entered in URL after <strong>/modules/</strong>?</p>
  
  <p>If anyone tell me what are the good ways to handle such issue.</p>