在你的controller上面加上 @CrossOrigin 注解即可
如果加在BaseController上,其他Controller继承BaseController即可
/**
* ClassName: BaseController
* Function: TODO
* Date: 2018-09-29 10:36
* author likaixuan
* version V1.0
*/
@CrossOrigin
public class BaseController {
}