If I make:
@Autowired
protected MockMvc mockMvc;
mockMvc.perform(delete("/example/test@email.com");
Controller gets test@email instead of test@email.com. How to pass URL with dot to MockMvc
?
If I make:
@Autowired
protected MockMvc mockMvc;
mockMvc.perform(delete("/example/test@email.com");
Controller gets test@email instead of test@email.com. How to pass URL with dot to MockMvc
?
You have to extend your Controllers Method to accept dots.
E.g. you can write it like this:
@RequestMapping(value = "/delete/{email:.*}",
method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)