Search in sources :

Example 1 with MappingJackson2XmlHttpMessageConverter

use of org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter in project nikita-noark5-core by HiOA-ABI.

the class AppWebMvcConfiguration method extendMessageConverters.

/**
     *  Allows us to pretty print JSON/XML output. CLI tools like curl may not prettyprint for you
     *  so this allows us to format the api output so that any developer testing the system gets nicely
     *  formatted output.
     *  However the client should be using Accept: application/json or application/xml when connecting
     */
@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
    final Optional<HttpMessageConverter<?>> jsonConverterFound = converters.stream().filter(c -> c instanceof MappingJackson2HttpMessageConverter).findFirst();
    if (jsonConverterFound.isPresent()) {
        final AbstractJackson2HttpMessageConverter converter = (AbstractJackson2HttpMessageConverter) jsonConverterFound.get();
        converter.getObjectMapper().enable(SerializationFeature.INDENT_OUTPUT);
        // Convert timestamps to readable text strings
        converter.getObjectMapper().configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
        converter.getObjectMapper().enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
    }
    final Optional<HttpMessageConverter<?>> xmlConverterFound = converters.stream().filter(c -> c instanceof MappingJackson2XmlHttpMessageConverter).findFirst();
    if (jsonConverterFound.isPresent()) {
        final MappingJackson2XmlHttpMessageConverter converter = (MappingJackson2XmlHttpMessageConverter) xmlConverterFound.get();
        converter.getObjectMapper().enable(SerializationFeature.INDENT_OUTPUT);
        converter.getObjectMapper().enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
    }
}
Also used : Ordered(org.springframework.core.Ordered) ViewResolver(org.springframework.web.servlet.ViewResolver) NikitaETAGInterceptor(no.arkivlab.hioa.nikita.webapp.web.interceptor.NikitaETAGInterceptor) VersionResourceResolver(org.springframework.web.servlet.resource.VersionResourceResolver) LocaleResolver(org.springframework.web.servlet.LocaleResolver) InternalResourceViewResolver(org.springframework.web.servlet.view.InternalResourceViewResolver) AbstractJackson2HttpMessageConverter(org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter) SessionLocaleResolver(org.springframework.web.servlet.i18n.SessionLocaleResolver) EnableSpringDataWebSupport(org.springframework.data.web.config.EnableSpringDataWebSupport) CacheControl(org.springframework.http.CacheControl) org.springframework.web.servlet.config.annotation(org.springframework.web.servlet.config.annotation) DeserializationFeature(com.fasterxml.jackson.databind.DeserializationFeature) StringHttpMessageConverter(org.springframework.http.converter.StringHttpMessageConverter) TimeUnit(java.util.concurrent.TimeUnit) LocaleChangeInterceptor(org.springframework.web.servlet.i18n.LocaleChangeInterceptor) List(java.util.List) MappingJackson2HttpMessageConverter(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter) Locale(java.util.Locale) Optional(java.util.Optional) SerializationFeature(com.fasterxml.jackson.databind.SerializationFeature) Bean(org.springframework.context.annotation.Bean) MappingJackson2XmlHttpMessageConverter(org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter) MappingJackson2HttpMessageConverter(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter) MappingJackson2XmlHttpMessageConverter(org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter) AbstractJackson2HttpMessageConverter(org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter) StringHttpMessageConverter(org.springframework.http.converter.StringHttpMessageConverter) MappingJackson2HttpMessageConverter(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter) MappingJackson2XmlHttpMessageConverter(org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter) AbstractJackson2HttpMessageConverter(org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter)

Example 2 with MappingJackson2XmlHttpMessageConverter

use of org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter in project nikita-noark5-core by HiOA-ABI.

the class AppWebMvcConfiguration method extendMessageConverters.

/**
 *  Allows us to pretty print JSON/XML output. CLI tools like curl may not prettyprint for you
 *  so this allows us to format the api output so that any developer testing the system gets nicely
 *  formatted output.
 *  However the client should be using Accept: application/json or application/xml when connecting
 */
@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
    final Optional<HttpMessageConverter<?>> jsonConverterFound = converters.stream().filter(c -> c instanceof MappingJackson2HttpMessageConverter).findFirst();
    if (jsonConverterFound.isPresent()) {
        final AbstractJackson2HttpMessageConverter converter = (AbstractJackson2HttpMessageConverter) jsonConverterFound.get();
        converter.getObjectMapper().enable(SerializationFeature.INDENT_OUTPUT);
        // Convert timestamps to readable text strings
        converter.getObjectMapper().configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
        converter.getObjectMapper().enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
    }
    final Optional<HttpMessageConverter<?>> xmlConverterFound = converters.stream().filter(c -> c instanceof MappingJackson2XmlHttpMessageConverter).findFirst();
    if (jsonConverterFound.isPresent()) {
        final MappingJackson2XmlHttpMessageConverter converter = (MappingJackson2XmlHttpMessageConverter) xmlConverterFound.get();
        converter.getObjectMapper().enable(SerializationFeature.INDENT_OUTPUT);
        converter.getObjectMapper().enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
    }
}
Also used : PathMatchConfigurer(org.springframework.web.servlet.config.annotation.PathMatchConfigurer) VersionResourceResolver(org.springframework.web.servlet.resource.VersionResourceResolver) AbstractJackson2HttpMessageConverter(org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter) ResourceHandlerRegistry(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry) EnableSpringDataWebSupport(org.springframework.data.web.config.EnableSpringDataWebSupport) CacheControl(org.springframework.http.CacheControl) DeserializationFeature(com.fasterxml.jackson.databind.DeserializationFeature) StringHttpMessageConverter(org.springframework.http.converter.StringHttpMessageConverter) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) MappingJackson2HttpMessageConverter(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter) InterceptorRegistry(org.springframework.web.servlet.config.annotation.InterceptorRegistry) Optional(java.util.Optional) SerializationFeature(com.fasterxml.jackson.databind.SerializationFeature) NikitaETAGInterceptor(nikita.webapp.web.interceptor.NikitaETAGInterceptor) WebMvcConfigurer(org.springframework.web.servlet.config.annotation.WebMvcConfigurer) MappingJackson2XmlHttpMessageConverter(org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter) MappingJackson2HttpMessageConverter(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter) MappingJackson2XmlHttpMessageConverter(org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter) AbstractJackson2HttpMessageConverter(org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter) StringHttpMessageConverter(org.springframework.http.converter.StringHttpMessageConverter) MappingJackson2HttpMessageConverter(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter) MappingJackson2XmlHttpMessageConverter(org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter) AbstractJackson2HttpMessageConverter(org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter)

Example 3 with MappingJackson2XmlHttpMessageConverter

use of org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter in project herd by FINRAOS.

the class RestSpringModuleConfig method configureMessageConverters.

/**
 * This is called from requestMappingHandlerAdapter to configure the message converters. We override it to configure our own converter in addition to the
 * default converters.
 *
 * @param converters the converter list we configure.
 */
@Override
@SuppressWarnings("rawtypes")
protected void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
    // Add in our custom converter first.
    converters.add(marshallingMessageConverter());
    // Add in the default converters (e.g. standard JAXB, Jackson, etc.).
    addDefaultHttpMessageConverters(converters);
    // Set jackson mapper to include only properties with non-null values.
    for (HttpMessageConverter httpMessageConverter : converters) {
        if (httpMessageConverter instanceof MappingJackson2XmlHttpMessageConverter) {
            converters.remove(httpMessageConverter);
            break;
        }
    }
}
Also used : MappingJackson2XmlHttpMessageConverter(org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter) MappingJackson2XmlHttpMessageConverter(org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter) MarshallingHttpMessageConverter(org.springframework.http.converter.xml.MarshallingHttpMessageConverter) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter)

Example 4 with MappingJackson2XmlHttpMessageConverter

use of org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter in project spring-framework by spring-projects.

the class WebMvcConfigurationSupportTests method requestMappingHandlerAdapter.

@Test
public void requestMappingHandlerAdapter() {
    ApplicationContext context = initContext(WebConfig.class);
    RequestMappingHandlerAdapter adapter = context.getBean(RequestMappingHandlerAdapter.class);
    List<HttpMessageConverter<?>> converters = adapter.getMessageConverters();
    assertThat(converters.size()).isEqualTo(12);
    converters.stream().filter(converter -> converter instanceof AbstractJackson2HttpMessageConverter).forEach(converter -> {
        ObjectMapper mapper = ((AbstractJackson2HttpMessageConverter) converter).getObjectMapper();
        assertThat(mapper.getDeserializationConfig().isEnabled(DEFAULT_VIEW_INCLUSION)).isFalse();
        assertThat(mapper.getSerializationConfig().isEnabled(DEFAULT_VIEW_INCLUSION)).isFalse();
        assertThat(mapper.getDeserializationConfig().isEnabled(FAIL_ON_UNKNOWN_PROPERTIES)).isFalse();
        if (converter instanceof MappingJackson2XmlHttpMessageConverter) {
            assertThat(mapper.getClass()).isEqualTo(XmlMapper.class);
        }
    });
    ConfigurableWebBindingInitializer initializer = (ConfigurableWebBindingInitializer) adapter.getWebBindingInitializer();
    assertThat(initializer).isNotNull();
    ConversionService conversionService = initializer.getConversionService();
    assertThat(conversionService).isNotNull();
    boolean condition1 = conversionService instanceof FormattingConversionService;
    assertThat(condition1).isTrue();
    Validator validator = initializer.getValidator();
    assertThat(validator).isNotNull();
    boolean condition = validator instanceof LocalValidatorFactoryBean;
    assertThat(condition).isTrue();
    DirectFieldAccessor fieldAccessor = new DirectFieldAccessor(adapter);
    @SuppressWarnings("unchecked") List<Object> bodyAdvice = (List<Object>) fieldAccessor.getPropertyValue("requestResponseBodyAdvice");
    assertThat(bodyAdvice.size()).isEqualTo(2);
    assertThat(bodyAdvice.get(0).getClass()).isEqualTo(JsonViewRequestBodyAdvice.class);
    assertThat(bodyAdvice.get(1).getClass()).isEqualTo(JsonViewResponseBodyAdvice.class);
}
Also used : LocaleContextHolder(org.springframework.context.i18n.LocaleContextHolder) PathVariable(org.springframework.web.bind.annotation.PathVariable) DefaultRequestToViewNameTranslator(org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator) DEFAULT_VIEW_INCLUSION(com.fasterxml.jackson.databind.MapperFeature.DEFAULT_VIEW_INCLUSION) Validator(org.springframework.validation.Validator) WebDataBinderFactory(org.springframework.web.bind.support.WebDataBinderFactory) Date(java.util.Date) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) ModelAndViewContainer(org.springframework.web.method.support.ModelAndViewContainer) LocaleResolver(org.springframework.web.servlet.LocaleResolver) HandlerExecutionChain(org.springframework.web.servlet.HandlerExecutionChain) DateTimeFormat(org.springframework.format.annotation.DateTimeFormat) NativeWebRequest(org.springframework.web.context.request.NativeWebRequest) SessionFlashMapManager(org.springframework.web.servlet.support.SessionFlashMapManager) MockHttpServletResponse(org.springframework.web.testfixture.servlet.MockHttpServletResponse) FAIL_ON_UNKNOWN_PROPERTIES(com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) HandlerExceptionResolverComposite(org.springframework.web.servlet.handler.HandlerExceptionResolverComposite) MvcUriComponentsBuilder(org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder) Locale(java.util.Locale) Map(java.util.Map) MethodParameter(org.springframework.core.MethodParameter) AntPathMatcher(org.springframework.util.AntPathMatcher) LocalValidatorFactoryBean(org.springframework.validation.beanvalidation.LocalValidatorFactoryBean) JsonViewRequestBodyAdvice(org.springframework.web.servlet.mvc.method.annotation.JsonViewRequestBodyAdvice) AcceptHeaderLocaleResolver(org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver) MappingJackson2XmlHttpMessageConverter(org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter) HandlerMethodArgumentResolver(org.springframework.web.method.support.HandlerMethodArgumentResolver) MockHttpServletRequest(org.springframework.web.testfixture.servlet.MockHttpServletRequest) ConfigurableWebBindingInitializer(org.springframework.web.bind.support.ConfigurableWebBindingInitializer) ISO(org.springframework.format.annotation.DateTimeFormat.ISO) StaticMessageSource(org.springframework.context.support.StaticMessageSource) Test(org.junit.jupiter.api.Test) Configuration(org.springframework.context.annotation.Configuration) List(java.util.List) HttpEntity(org.springframework.http.HttpEntity) HandlerExceptionResolver(org.springframework.web.servlet.HandlerExceptionResolver) HandlerMapping(org.springframework.web.servlet.HandlerMapping) FixedThemeResolver(org.springframework.web.servlet.theme.FixedThemeResolver) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter) FlashMapManager(org.springframework.web.servlet.FlashMapManager) RequestMappingHandlerMapping(org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping) ExceptionHandlerExceptionResolver(org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver) ConversionServiceExposingInterceptor(org.springframework.web.servlet.handler.ConversionServiceExposingInterceptor) FLASH_MAP_MANAGER_BEAN_NAME(org.springframework.web.servlet.DispatcherServlet.FLASH_MAP_MANAGER_BEAN_NAME) ResponseStatusExceptionResolver(org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver) RequestMappingHandlerAdapter(org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter) HandlerMethodReturnValueHandler(org.springframework.web.method.support.HandlerMethodReturnValueHandler) THEME_RESOLVER_BEAN_NAME(org.springframework.web.servlet.DispatcherServlet.THEME_RESOLVER_BEAN_NAME) REQUEST_TO_VIEW_NAME_TRANSLATOR_BEAN_NAME(org.springframework.web.servlet.DispatcherServlet.REQUEST_TO_VIEW_NAME_TRANSLATOR_BEAN_NAME) Ordered(org.springframework.core.Ordered) ResourceUrlProviderExposingInterceptor(org.springframework.web.servlet.resource.ResourceUrlProviderExposingInterceptor) HttpServletRequest(jakarta.servlet.http.HttpServletRequest) ThemeResolver(org.springframework.web.servlet.ThemeResolver) XmlMapper(com.fasterxml.jackson.dataformat.xml.XmlMapper) JsonViewResponseBodyAdvice(org.springframework.web.servlet.mvc.method.annotation.JsonViewResponseBodyAdvice) InternalResourceViewResolver(org.springframework.web.servlet.view.InternalResourceViewResolver) AbstractJackson2HttpMessageConverter(org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) DirectFieldAccessor(org.springframework.beans.DirectFieldAccessor) Controller(org.springframework.stereotype.Controller) Scope(org.springframework.context.annotation.Scope) RequestToViewNameTranslator(org.springframework.web.servlet.RequestToViewNameTranslator) LOCALE_RESOLVER_BEAN_NAME(org.springframework.web.servlet.DispatcherServlet.LOCALE_RESOLVER_BEAN_NAME) CompositeUriComponentsContributor(org.springframework.web.method.support.CompositeUriComponentsContributor) HandlerInterceptor(org.springframework.web.servlet.HandlerInterceptor) AnnotationConfigWebApplicationContext(org.springframework.web.context.support.AnnotationConfigWebApplicationContext) ResponseStatus(org.springframework.web.bind.annotation.ResponseStatus) ConversionService(org.springframework.core.convert.ConversionService) MessageSource(org.springframework.context.MessageSource) ViewResolver(org.springframework.web.servlet.ViewResolver) PathMatcher(org.springframework.util.PathMatcher) ViewResolverComposite(org.springframework.web.servlet.view.ViewResolverComposite) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) ScopedProxyMode(org.springframework.context.annotation.ScopedProxyMode) FormattingConversionService(org.springframework.format.support.FormattingConversionService) ApplicationContext(org.springframework.context.ApplicationContext) BeanNameViewResolver(org.springframework.web.servlet.view.BeanNameViewResolver) HttpStatus(org.springframework.http.HttpStatus) BeanNameUrlHandlerMapping(org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping) UrlPathHelper(org.springframework.web.util.UrlPathHelper) Bean(org.springframework.context.annotation.Bean) DefaultHandlerExceptionResolver(org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver) MockServletContext(org.springframework.web.testfixture.servlet.MockServletContext) LocalValidatorFactoryBean(org.springframework.validation.beanvalidation.LocalValidatorFactoryBean) FormattingConversionService(org.springframework.format.support.FormattingConversionService) AnnotationConfigWebApplicationContext(org.springframework.web.context.support.AnnotationConfigWebApplicationContext) ApplicationContext(org.springframework.context.ApplicationContext) ConfigurableWebBindingInitializer(org.springframework.web.bind.support.ConfigurableWebBindingInitializer) MappingJackson2XmlHttpMessageConverter(org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter) ConversionService(org.springframework.core.convert.ConversionService) FormattingConversionService(org.springframework.format.support.FormattingConversionService) DirectFieldAccessor(org.springframework.beans.DirectFieldAccessor) MappingJackson2XmlHttpMessageConverter(org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter) AbstractJackson2HttpMessageConverter(org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter) AbstractJackson2HttpMessageConverter(org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter) List(java.util.List) RequestMappingHandlerAdapter(org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Validator(org.springframework.validation.Validator) Test(org.junit.jupiter.api.Test)

Example 5 with MappingJackson2XmlHttpMessageConverter

use of org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter in project spring-framework by spring-projects.

the class WebMvcConfigurationSupport method addDefaultHttpMessageConverters.

/**
 * Adds a set of default HttpMessageConverter instances to the given list.
 * Subclasses can call this method from {@link #configureMessageConverters}.
 * @param messageConverters the list to add the default message converters to
 */
protected final void addDefaultHttpMessageConverters(List<HttpMessageConverter<?>> messageConverters) {
    messageConverters.add(new ByteArrayHttpMessageConverter());
    messageConverters.add(new StringHttpMessageConverter());
    messageConverters.add(new ResourceHttpMessageConverter());
    messageConverters.add(new ResourceRegionHttpMessageConverter());
    if (!shouldIgnoreXml) {
        try {
            messageConverters.add(new SourceHttpMessageConverter<>());
        } catch (Throwable ex) {
        // Ignore when no TransformerFactory implementation is available...
        }
    }
    messageConverters.add(new AllEncompassingFormHttpMessageConverter());
    if (romePresent) {
        messageConverters.add(new AtomFeedHttpMessageConverter());
        messageConverters.add(new RssChannelHttpMessageConverter());
    }
    if (!shouldIgnoreXml) {
        if (jackson2XmlPresent) {
            Jackson2ObjectMapperBuilder builder = Jackson2ObjectMapperBuilder.xml();
            if (this.applicationContext != null) {
                builder.applicationContext(this.applicationContext);
            }
            messageConverters.add(new MappingJackson2XmlHttpMessageConverter(builder.build()));
        } else if (jaxb2Present) {
            messageConverters.add(new Jaxb2RootElementHttpMessageConverter());
        }
    }
    if (kotlinSerializationJsonPresent) {
        messageConverters.add(new KotlinSerializationJsonHttpMessageConverter());
    }
    if (jackson2Present) {
        Jackson2ObjectMapperBuilder builder = Jackson2ObjectMapperBuilder.json();
        if (this.applicationContext != null) {
            builder.applicationContext(this.applicationContext);
        }
        messageConverters.add(new MappingJackson2HttpMessageConverter(builder.build()));
    } else if (gsonPresent) {
        messageConverters.add(new GsonHttpMessageConverter());
    } else if (jsonbPresent) {
        messageConverters.add(new JsonbHttpMessageConverter());
    }
    if (jackson2SmilePresent) {
        Jackson2ObjectMapperBuilder builder = Jackson2ObjectMapperBuilder.smile();
        if (this.applicationContext != null) {
            builder.applicationContext(this.applicationContext);
        }
        messageConverters.add(new MappingJackson2SmileHttpMessageConverter(builder.build()));
    }
    if (jackson2CborPresent) {
        Jackson2ObjectMapperBuilder builder = Jackson2ObjectMapperBuilder.cbor();
        if (this.applicationContext != null) {
            builder.applicationContext(this.applicationContext);
        }
        messageConverters.add(new MappingJackson2CborHttpMessageConverter(builder.build()));
    }
}
Also used : Jaxb2RootElementHttpMessageConverter(org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter) MappingJackson2HttpMessageConverter(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter) ResourceRegionHttpMessageConverter(org.springframework.http.converter.ResourceRegionHttpMessageConverter) AtomFeedHttpMessageConverter(org.springframework.http.converter.feed.AtomFeedHttpMessageConverter) ByteArrayHttpMessageConverter(org.springframework.http.converter.ByteArrayHttpMessageConverter) GsonHttpMessageConverter(org.springframework.http.converter.json.GsonHttpMessageConverter) StringHttpMessageConverter(org.springframework.http.converter.StringHttpMessageConverter) MappingJackson2SmileHttpMessageConverter(org.springframework.http.converter.smile.MappingJackson2SmileHttpMessageConverter) JsonbHttpMessageConverter(org.springframework.http.converter.json.JsonbHttpMessageConverter) Jackson2ObjectMapperBuilder(org.springframework.http.converter.json.Jackson2ObjectMapperBuilder) MappingJackson2XmlHttpMessageConverter(org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter) KotlinSerializationJsonHttpMessageConverter(org.springframework.http.converter.json.KotlinSerializationJsonHttpMessageConverter) RssChannelHttpMessageConverter(org.springframework.http.converter.feed.RssChannelHttpMessageConverter) ResourceHttpMessageConverter(org.springframework.http.converter.ResourceHttpMessageConverter) AllEncompassingFormHttpMessageConverter(org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter) MappingJackson2CborHttpMessageConverter(org.springframework.http.converter.cbor.MappingJackson2CborHttpMessageConverter)

Aggregations

MappingJackson2XmlHttpMessageConverter (org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter)12 HttpMessageConverter (org.springframework.http.converter.HttpMessageConverter)9 MappingJackson2HttpMessageConverter (org.springframework.http.converter.json.MappingJackson2HttpMessageConverter)9 StringHttpMessageConverter (org.springframework.http.converter.StringHttpMessageConverter)8 Test (org.junit.jupiter.api.Test)6 MethodParameter (org.springframework.core.MethodParameter)5 ByteArrayHttpMessageConverter (org.springframework.http.converter.ByteArrayHttpMessageConverter)5 ResourceHttpMessageConverter (org.springframework.http.converter.ResourceHttpMessageConverter)5 AllEncompassingFormHttpMessageConverter (org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter)5 Method (java.lang.reflect.Method)4 ArrayList (java.util.ArrayList)4 AbstractJackson2HttpMessageConverter (org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter)4 HandlerMethod (org.springframework.web.method.HandlerMethod)4 List (java.util.List)3 DeserializationFeature (com.fasterxml.jackson.databind.DeserializationFeature)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 SerializationFeature (com.fasterxml.jackson.databind.SerializationFeature)2 Locale (java.util.Locale)2 Optional (java.util.Optional)2 TimeUnit (java.util.concurrent.TimeUnit)2