Consider the following:
@GetMapping("/accounts/{id}")
@ResponseBody
public Account handle() {
return new Account("1", "sample");
}
There is no Accept
header specified in the request, but still the response is by default converted to JSON
when Spring Boot is used. The @ResponseBody
annotation, in its documentation, doesn't mention anything about there being a conversion