Comment From: snicoll
@garyrussell I can see that setBatchErrorHandler
and setErrorHandler
have been deprecated. Spring Boot does look for both a BatchErrorHandler
and a ErrorHandler
and sets those accordingly.
What is our best migration path? Introducing the lookup to CommonErrorHandler
in a maintenance release feels unusual to me.
Comment From: wilkinsona
We added support for CommonErrorHandler
in https://github.com/spring-projects/spring-boot/pull/27927. I think we should just suppress the deprecation warnings for ErrorHandler
and BatchErrorHandler
while people migrate to CommonErrorHandler
.
Comment From: garyrussell
This change was introduced (in 2.8) to allow a common (auto configured) container factory to be used for both types of listener.
I have now deprecated the setters to help users understand the migration path.
I think we can remove auto configuring the legacy error handlers in 3.0 and, yes, suppress the warning in 2.7.
I have removed all the legacy error handler implementations in 3.0 (and deprecated the legacy interfaces).
Comment From: snicoll
suppress the warning in 2.7
We have to suppress the warning in 2.6 which was my original concern but the fact we already handle CommonErrorHandler
answers my question. It would have been ideal to do this at the same time though.
Comment From: garyrussell
It would have been ideal to do this at the same time though.
Yes; it was an omission; sorry.