Код: Выделить всё
@RequestMapping(value = "/test", produces = "text/plain")
@ResponseBody
public Object test() {
return "true";
}
РЕДАКТИРОВАТЬ:
Я нашел частичный решение
Код: Выделить всё
@RequestMapping(value = "/test")
@ResponseBody
public Object test(){
HttpHeaders responseHeaders = new HttpHeaders();
responseHeaders.setContentType(MediaType.TEXT_PLAIN);
return new ResponseEntity("true", responseHeaders, HttpStatus.OK);
}
Подробнее здесь: https://stackoverflow.com/questions/522 ... ept-header