0

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?

Justinas Jakavonis
  • 8,220
  • 10
  • 69
  • 114

1 Answers1

2

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)
mrkernelpanic
  • 4,268
  • 4
  • 28
  • 52