No 'Access-Control-Allow-Origin' header is present on the requested resource SpringBoot 跨域

跨域说明 前后端分离下,跨域已是一个老生常谈的话题,但很多小伙伴还是经常面临这样的问题,且解决方案多变多样。这里介绍一种简单直接的后端解决方案。 解决跨域(服务端) /*** CorsConfig-跨域* * author ylyue* si…

Quasar Vue Springboot 跨域问题 No 'Access-Control-Allow-Origin' header is present on the requested

困扰了近半个月的跨域问题解决了。 服务端是Springboot,前端是Vue 服务端地址是:http://localhost:8066 前端地址是:http://localhost:6006 前端发送请求使用的是axios,之前设置的baseURL是 process.env.BASE_API,…