Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MediaType acceptType = config.getDefaultMediaType();
- HttpMessageConverter converter = findWriteConverter(resource.getClass(), acceptType);
- // If an Accept header is specified that isn't the catch-all, try and find a converter for it.
- if(null == converter) {
- for(MediaType mt : request.getHeaders().getAccept()) {
- if(MediaType.ALL.equals(mt)) {
- continue;
- }
Add Comment
Please, Sign In to add comment