vue前后端分离项目SpringSecurity跨域问题解决方案
未解决跨域问题时访问后台出现如下错误:
No 'Access-Control-Allow-Origin' header is present on the requested resource...
解决步骤如下:
1. 在WebSecurityConfig配置中开启跨域支持,部分代码如下:
//开启跨域
.cors()
.and()
.csrf()
.disable()
.au...
原创
2019-03-21 18:14:13 ·
4972 阅读 ·
3 评论