@Override
  protected void beforeBodyWriteInternal(
      MappingJacksonValue bodyContainer,
      MediaType contentType,
      MethodParameter returnType,
      ServerHttpRequest request,
      ServerHttpResponse response) {

    HttpServletRequest servletRequest = ((ServletServerHttpRequest) request).getServletRequest();

    for (String name : this.jsonpQueryParamNames) {
      String value = servletRequest.getParameter(name);
      if (value != null) {
        MediaType contentTypeToUse = getContentType(contentType, request, response);
        response.getHeaders().setContentType(contentTypeToUse);
        bodyContainer.setJsonpFunction(value);
        return;
      }
    }
  }
 @Override
 public void render() throws IOException, Exception {
   MappingJacksonValue mappingJacksonValue = new MappingJacksonValue(map);
   mappingJacksonValue.setJsonpFunction(callback);
   httpMessageConverter.write(mappingJacksonValue, mediaType, response);
 }