is there any way to make default content type?
i use this
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.ignoreAcceptHeader(true).defaultContentType(MediaType.APPLICATION_JSON);
}
and it works good for methods without produces= ....
this method do not work with this config
@GetMapping(value = "/test/{testId}",
produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
ResponseEntity<Resource> getTestAttachment @PathVariable Integer testId);
when i call this method i got 406 Http error
finally found this way