猿问

springboot的jsonp怎么设置

springboot的jsonp怎么设置


HUX布斯
浏览 1155回答 1
微课
1回答

冉冉说

package com.zkn.learnspringboot.config;import org.springframework.web.bind.annotation.ControllerAdvice;import org.springframework.web.servlet.mvc.method.annotation.AbstractJsonpResponseBodyAdvice;/*** Created by wb-zhangkenan on 2016/12/1.*/@ControllerAdvice(basePackages = "com.zkn.learnspringboot.web.controller")public class JsonpAdvice extends AbstractJsonpResponseBodyAdvice{public JsonpAdvice() {super("callback","jsonp");}}
随时随地看视频慕课网APP
我要回答