我只想通过一个简单的 servlet 返回文本“true”:
@RequestMapping(value = "/", method = RequestMethod.GET)
@ResponseBody
public Boolean isValid() {
return true;
}
结果:406 - The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.
。
为什么?我怎样才能返回那个简单的值?如果我将返回类型更改为String "true"
.