在spring boot项目中出现不能加载iframejava
页面空白,或者ie显示不容许加载页面spring
报一个"Refused to display 'http://......' in a frame because it set 'X-Frame-Options' to 'DENY'. "错误ide
解决方式:ui
因spring Boot采起的java config,在配置spring security的位置添加:spa
@Override protected void configure(HttpSecurity http) throws Exception { http.headers().frameOptions().disable(); http .csrf().disable() .authorizeRequests() .antMatchers("/suishoupai_search.do").hasRole("USER") .and() .formLogin() .failureUrl("/login?failed=true") .loginPage("/login") .permitAll() .and() .logout() .permitAll(); }