title: Spring - Path variable truncate after dot - annotation
body: <p>I am trying to set up a REST endpoint that allows querying a user by their email address. The email address is the last portion of the path so Spring is treating <code>foo@example.com</code> as the value <code>foo@example</code> and truncating the extension <code>.com</code>.</p>
  
  <p>I found a similar question here <a href="https://stackoverflow.com/questions/16332092/spring-mvc-pathvariable-with-dot-is-getting-truncated">Spring MVC @PathVariable with dot (.) is getting truncated</a>
  However, I have an annotation based configuration using <code>AbstractAnnotationConfigDispatcherServletInitializer</code> and <code>WebMvcConfigurerAdapter</code>. Since I have no xml configuration, this solution will not work for me:</p>
  
  <pre><code>&lt;bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"&gt;
      &lt;property name="useDefaultSuffixPattern" value="false" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I have also tried this solution which uses regex but it has not worked either.</p>
  
  <pre><code>@RequestMapping(value = "user/by-email/{email:.+}")
  </code></pre>
  
  <p>Does anyone know how to turn off the suffix pattern truncation without xml?</p>