Guest User

Untitled

a guest
Dec 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. MediaType acceptType = config.getDefaultMediaType();
  2. HttpMessageConverter converter = findWriteConverter(resource.getClass(), acceptType);
  3. // If an Accept header is specified that isn't the catch-all, try and find a converter for it.
  4. if(null == converter) {
  5. for(MediaType mt : request.getHeaders().getAccept()) {
  6. if(MediaType.ALL.equals(mt)) {
  7. continue;
  8. }
Add Comment
Please, Sign In to add comment