Spring boot Spring-Security-SAML:auth错误导致';无法转发请求的错误页[/saml/SSO],因为响应已提交;

Spring boot Spring-Security-SAML:auth错误导致';无法转发请求的错误页[/saml/SSO],因为响应已提交;,spring-boot,spring-saml,Spring Boot,Spring Saml,我使用文档中给出的示例将Spring Boot应用程序配置为SAML服务提供商: 我已经能够使用多个身份提供程序使登录/注销正常工作,但是我无法使authenticationFailureHandler()配置正常工作。如果存在身份验证错误(例如“responder”错误),Spring的ErrorPageFilter会抱怨: ERROR o.s.b.w.s.support.ErrorPageFilter - Cannot forward to error page for request [/

我使用文档中给出的示例将Spring Boot应用程序配置为SAML服务提供商:

我已经能够使用多个身份提供程序使登录/注销正常工作,但是我无法使authenticationFailureHandler()配置正常工作。如果存在身份验证错误(例如“responder”错误),Spring的ErrorPageFilter会抱怨:

ERROR o.s.b.w.s.support.ErrorPageFilter - Cannot forward to error page for request [/saml/SSO] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false
最终的反应是404错误,这不是我们想要的

应用程序其余部分中的错误处理按预期工作——只有身份验证期间的错误处理未按预期工作

我想发生的事:

我希望身份验证错误重定向到URL,并由我的错误处理代码(记录异常并生成通知和其他内务管理)处理

我怎样才能做到这一点