解决办法如下: 找到SpringSecurityConfigurer这个类,修改如下: 复制代码 @Override protected void configure(HttpSecurity httpSecurity) throws Exception { httpSecurity.headers().frameOptions().disable(); } 来源:https://www.cnblogs.com/ycyzharry/p/9888297.html