hi, we upgraded to spring boot 3 and one of the th...
# spring
n
hi, we upgraded to spring boot 3 and one of the things i cannot figure out .. is that some responses of our server changed from
application/json
to
application/cbor
(we have SOME responses that are explicitely cbor, but we don’t want all of the API to be) anyone knows how to tweak that.. or how to configure content negotiation or the like ? all tutorials i find for that are horribly outdated… it also seems to ignore
Acccept
header sent by a client right now..
d
If the same endpoint always returns the same content type, you can provide the content type as part of the request mapping annotation. I.e.
Copy code
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
fun getMySomething() {}
n
that ended up being my solution.. but a global configuration for how to compute which media type to be used.. based on request (when not defined or multiple are defined) would be pretty useful