@RequestMapping(value = "/contacts/email/{email}", method = GET) public String getContactByEmail(@PathVariable String email) throws JsonProcessingException { ObjectMapper mapper = new ObjectMapper(); mapper.getFactory().configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true); ContactDto contact = contactService.getByEmail(email); return mapper.writeValueAsString(contact); }