package com.ozz.springboot.component.advice;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.servlet.mvc.method.annotation.AbstractJsonpResponseBodyAdvice;

/**
 * 支持jsonp
 * 
 * 需要返回jsonp格式时在参数中加callback=?即可
 */
@ControllerAdvice(basePackages = "com.ozz.springboot.web")
public class JsonpResponseBodyAdvice extends AbstractJsonpResponseBodyAdvice {
  public JsonpResponseBodyAdvice() {
    super("callback", "jsonp");
  }
}
@@ -45,74 +45,10 @@
 %0D%0A%0D%0A
-import org.springframework.web.bind.annotation.ControllerAdvice;%0D%0A
+//
 impo
@@ -138,18 +138,16 @@
 dvice;%0D%0A
-%0D%0A
 /**%0D%0A * 
@@ -200,11 +200,200 @@
 %0D%0A *
-/%0D%0A
+ %0D%0A * @deprecated Will be removed as of Spring Framework 5.1, use%0D%0A * %3Ca href=%22https://docs.spring.io/spring/docs/5.0.x/spring-framework-reference/web.html#mvc-cors%22%3ECORS%3C/a%3E instead.%0D%0A */%0D%0A//
 @Con
@@ -448,16 +448,18 @@
 .web%22)%0D%0A
+//
 public c
@@ -530,16 +530,18 @@
 vice %7B%0D%0A
+//
   public
@@ -570,16 +570,18 @@
 ce() %7B%0D%0A
+//
     supe
@@ -609,10 +609,57 @@
 );%0D%0A
+//
   %7D%0D%0A
+//%7D%0D%0Apublic class JsonpResponseBodyAdvice %7B%0D%0A
 %7D

remove jsonp