Examples of Jackson2ModuleRegisteringBeanPostProcessor


Examples of org.springframework.hateoas.config.HypermediaSupportBeanDefinitionRegistrar.Jackson2ModuleRegisteringBeanPostProcessor

  @SuppressWarnings("unchecked")
  public void halSetupIsAppliedToAllTransitiveComponentsInRequestMappingHandlerAdapter() {

    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(HalConfig.class);

    Jackson2ModuleRegisteringBeanPostProcessor postProcessor = new HypermediaSupportBeanDefinitionRegistrar.Jackson2ModuleRegisteringBeanPostProcessor();
    postProcessor.setBeanFactory(context);

    RequestMappingHandlerAdapter adapter = context.getBean(RequestMappingHandlerAdapter.class);

    assertThat(adapter.getMessageConverters().get(0).getSupportedMediaTypes(), hasItem(MediaTypes.HAL_JSON));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.