Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/462.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用spring boot将回调方法从JavaScript传递到java后端?_Javascript_Java_Spring Boot - Fatal编程技术网

如何使用spring boot将回调方法从JavaScript传递到java后端?

如何使用spring boot将回调方法从JavaScript传递到java后端?,javascript,java,spring-boot,Javascript,Java,Spring Boot,我正在编写一个可以使用jsonp访问的代码。我需要将一个回调方法从java脚本传递到spring boot,使用ControllerAdvice @ControllerAdvice static class JsonpAdvice extends AbstractJsonpResponseBodyAdvice { public JsonpAdvice() { super("callback"); } } 使用控制器建议

我正在编写一个可以使用jsonp访问的代码。我需要将一个回调方法从java脚本传递到spring boot,使用ControllerAdvice

 @ControllerAdvice
    static class JsonpAdvice extends AbstractJsonpResponseBodyAdvice {

        public JsonpAdvice() {
            super("callback");
        }
    }
使用控制器建议

 @ControllerAdvice
    static class JsonpAdvice extends AbstractJsonpResponseBodyAdvice {

        public JsonpAdvice() {
            super("callback");
        }
    }

使用
@ControllerAdvice


有关更多详细信息,请访问使用
@ControllerAdvice


有关更多详细信息,请访问

您可以在spring boot中使用@ControllerAdvice

您可以在spring boot中使用@ControllerAdvice