I am facing a strange issue. This is my REST API mapping
@RequestMapping(
value = { "/{email}" },
method = RequestMethod.GET,
params = "time")
public void getEmail(
@PathVariable("email") final String sender,
@RequestParam(value = "time", required = true) final long time)
When I call API like this
/someone@someone.com?time=10
I observe that sender
contains someone@someone
instead of someone@someone.com
.
When I give it like this
@RequestMapping(
value = { "/{email:.+}" },
method = RequestMethod.GET,
params = "time")
public void getEmail(
@PathVariable("email") final String sender,
@RequestParam(value = "time", required = true) final long time)
I get 406 error.
I tried this too.
<bean
class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping">
<property name="useSuffixPatternMatch" value="false" />
</bean>
Still no help. What am I doing wrong?