Class AbstractJsonpResponseBodyAdvice

  • All Implemented Interfaces:
    ResponseBodyAdvice<Object>

    @Deprecated
    public abstract class AbstractJsonpResponseBodyAdvice
    extends AbstractMappingJacksonResponseBodyAdvice
    Deprecated.
    Will be removed as of Spring Framework 5.1, use CORS instead.
    A convenient base class for a ResponseBodyAdvice to instruct the MappingJackson2HttpMessageConverter to serialize with JSONP formatting.

    Sub-classes must specify the query parameter name(s) to check for the name of the JSONP callback function.

    Sub-classes are likely to be annotated with the @ControllerAdvice annotation and auto-detected or otherwise must be registered directly with the RequestMappingHandlerAdapter and ExceptionHandlerExceptionResolver.

    Since:
    4.1
    Author:
    Rossen Stoyanchev