引入SpringSecurity后显示localhost 拒绝了我们的连接请求
引入SpringSecurity后显示localhost 拒绝了我们的连接请求,找了很多资料不知道如何解决,在过程中也修改了SpringSecurity防火墙配置,无果。
仔细探究后,找到解决办法:
在SrpingSecurity配置类中找到protected void configure(HttpSecurity http) throws Exception方法,添加
http.csrf().disable();
.headers().frameOptions().disable();//允许iframe页面嵌套