测试写java代码

测试写java代码

 1 private String getRequestAcceptType(HttpServletRequest request) {
 2 
 3         String contentType = null;
 4 
 5         for (ContentTypeResolver resolver : this.contentTypeResolvers) {
 6 
 7             contentType = resolver.resolve(request);
 8             if (contentType != null) {
 9                 break;
10             }
11         }
12 
13         if (contentType == null) {
14             contentType = defaultContentType;
15         }
16 
17         return contentType;
18     }

完美,终于找到我要的写博客的地方了。

原文地址:https://www.cnblogs.com/yujun19880729/p/3457512.html