Package org.springframework.http.converter.json

Examples of org.springframework.http.converter.json.MappingJacksonHttpMessageConverter


        final ClassLoader classLoader = getClass().getClassLoader();
        if (ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper", classLoader)) {
            messageConverters.add(new MappingJackson2HttpMessageConverter());
        } else if (ClassUtils.isPresent("org.codehaus.jackson.map.ObjectMapper", classLoader)) {
            messageConverters.add(new MappingJacksonHttpMessageConverter());
        }

        super.configureMessageConverters(messageConverters);
    }
View Full Code Here


    converters.add(converter());
  }

  @Bean
  MappingJacksonHttpMessageConverter converter() {
    MappingJacksonHttpMessageConverter converter = new MappingJacksonHttpMessageConverter();
    converter.setObjectMapper(getObjectMapper());
    return converter;
  }
View Full Code Here

 
  private void registerNetflixModule(RestTemplate restTemplate) {
    List<HttpMessageConverter<?>> converters = restTemplate.getMessageConverters();
    for (HttpMessageConverter<?> converter : converters) {
      if(converter instanceof MappingJacksonHttpMessageConverter) {
        MappingJacksonHttpMessageConverter jsonConverter = (MappingJacksonHttpMessageConverter) converter;
        ObjectMapper objectMapper = new ObjectMapper();       
        objectMapper.registerModule(new NetFlixModule());
        jsonConverter.setObjectMapper(objectMapper);
      }
    }
  }
View Full Code Here

    return new ExtendedServletRequestDataBinderFactory(binderMethods, getWebBindingInitializer());
  }
 
  public ExtendedRequestMappingHandlerAdapter(){
    super();
    getMessageConverters().add(new MappingJacksonHttpMessageConverter());
  }
View Full Code Here

TOP

Related Classes of org.springframework.http.converter.json.MappingJacksonHttpMessageConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.