Access to XMLHttpRequest at 'http://xxxxxxxxxxxxxxxxxxx' from origin 'http:xxxxxx' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
这个问题,我遇到解决的是因为跨域请求访问,不允许。
解决办法,在后端的controller层里加上注解:@CrossOrigin