Hello. Trying to do this:
@RequestMapping(value = "/something") @ResponseBody public String helloWorld() { return "Русский текст"; } Page takes about this:
??????? ????? On the page encoding UTF-8. But even if she were different, in any case there would be no question marks. Please advise how to correct the situation.
I will add the question: It turned out very strange in this situation:
@RequestMapping(value = "/something") public ResponseEntity<MyCls> helloWorld() { MyCls cls = new MyCls(); cls.setStr("Русский текст"); HttpHeaders h = new HttpHeaders(); return new ResponseEntity(cls, h, HttpStatus.OK); } Now it worked the way I expected:
{"str":"Русский текст"} Do you have a spring for allergy type String?