code: @SuppressWarnings("deprecation")
      public static List<HttpMessageConverter<?>> getDefaultHttpMessageConverters() {
  
          List<HttpMessageConverter<?>> converters = new ArrayList<>();
  
          StringHttpMessageConverter stringConverter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
          stringConverter.setWriteAcceptCharset(false); // See SPR-7316
  
          converters.add(new ByteArrayHttpMessageConverter());
          converters.add(stringConverter);
          converters.add(new ResourceHttpMessageConverter());
  
          if (isJaxb2Present()) {
              converters.add(new Jaxb2RootElementHttpMessageConverter());
          }
          if (isJackson2Present()) {
              converters.add(new MappingJackson2HttpMessageConverter());
  
          } else if (isJacksonPresent()) {
              try {
                  Class<?> clazz = Class.forName("org.springframework.http.converter.json.MappingJacksonHttpMessageConverter");
                  converters.add((HttpMessageConverter<?>) clazz.newInstance());
  
              } catch (ClassNotFoundException ex) {
                  // Ignore it, this class is not available since Spring 4.1.0.
              } catch (InstantiationException | IllegalAccessException ex) {
                  throw new IllegalStateException(ex);
              }
          }
          return converters;
      }
docs: Returns default {@link HttpMessageConverter} instances, i.e.:
  
  <ul>
  <li>{@linkplain ByteArrayHttpMessageConverter}</li>
  <li>{@linkplain StringHttpMessageConverter}</li>
  <li>{@linkplain ResourceHttpMessageConverter}</li>
  <li>{@linkplain Jaxb2RootElementHttpMessageConverter} (when JAXB is present)</li>
  <li>{@linkplain MappingJackson2HttpMessageConverter} (when Jackson 2.x is present)</li>
  <li>{@linkplain org.springframework.http.converter.json.MappingJacksonHttpMessageConverter}
  (when Jackson 1.x is present and 2.x not)</li>
  </ul>
  
  <p>Note: It does not return all of the default converters defined in Spring, but just thus
  usable for exception responses.</p>