public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
… .
and()
.cors()// ***重点
.and()
.csrf().disable(); …
}
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
… .
and()
.cors()// ***重点
.and()
.csrf().disable(); …
}
本文标题:SpringBoot+Spring Security无法实现跨域
本文链接:https://www.haomeiwen.com/subject/agbtqktx.html
网友评论