Last active
December 26, 2015 18:09
-
-
Save rankun203/7192478 to your computer and use it in GitHub Desktop.
获取支持的MediaType
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RestTemplate tpl = new RestTemplate(); | |
List cvts = tpl.getMessageConverters(); | |
for (int i = 0; i < cvts.size(); i++) { | |
List smts = ((HttpMessageConverter)cvts.get(i)).getSupportedMediaTypes(); | |
for (int j = 0; j < smts.size(); j++) { | |
System.err.println(smts.get(j)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment