美文网首页
SpringBoot+Spring Security无法实现跨域

SpringBoot+Spring Security无法实现跨域

作者: 不务正业的程序猿 | 来源:发表于2020-06-30 10:46 被阅读0次

    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