' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
记录错误,出现cors为跨域错误,导致出现的情况有1.没有在主方法上加允许跨域的注解,2.路径存在问题
解决方案1. 在主启动类上加上对应注解 @CrossOrigin
2. 在前端页面的f12中查看请求路径是否存在问题
' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
记录错误,出现cors为跨域错误,导致出现的情况有1.没有在主方法上加允许跨域的注解,2.路径存在问题
解决方案1. 在主启动类上加上对应注解 @CrossOrigin
2. 在前端页面的f12中查看请求路径是否存在问题