spring framework 5.1版本怎么用jsonp

spring framework 5.1版本移除了jsonp支持,理由是根据什么w3c的标准,不需要这么复杂。

然后我写的程序不想改界面指向升级5.1版本,有没有大佬有较好的解决方案。

我可以直接给结果前后拼接callback的方法,这个不够优秀,不想用。

https://blog.csdn.net/lz710117239/article/details/79561226

/**
 * A convenient base class for a {@code ResponseBodyAdvice} to instruct the
 * {@link org.springframework.http.converter.json.MappingJackson2HttpMessageConverter}
 * to serialize with JSONP formatting.
 *
 * <p>Sub-classes must specify the query parameter name(s) to check for the name
 * of the JSONP callback function.
 *
 * <p>Sub-classes are likely to be annotated with the {@code @ControllerAdvice}
 * annotation and auto-detected or otherwise must be registered directly with the
 * {@code RequestMappingHandlerAdapter} and {@code ExceptionHandlerExceptionResolver}.
 *
 * @author Rossen Stoyanchev
 * @since 4.1
 * @deprecated Will be removed as of Spring Framework 5.1, use
 * <a href="https://docs.spring.io/spring/docs/5.0.x/spring-framework-reference/web.html#mvc-cors">CORS</a> instead.
 */
@Deprecated
public abstract class AbstractJsonpResponseBodyAdvice extends AbstractMappingJacksonResponseBodyAdvice {

您好,请问楼主这个问题解决了么,如何实现的呢,可以提供参考下么,谢谢