New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DefaultErrorAttributes is not working in SpringBoot 2.0.4 #14211
Comments
It's hard to tell from the code snippets what's happening. Please can you share a minimal project that reproduces the issue. |
I'm afraid but I don't have any minimal project to reproduce this issue, or may be could you help me with any working example of Spring boot 2 default error attributes? |
@philwebb today I again downgraded my application to 1.5.15 and it is again working. But as soon I upgrade to 2.0.x it doesn't work. Any Idea what could be the possible issue? |
@abhi4151 if you want us to take the time to look at this, please take the time to assemble a small sample that we can run ourselves. |
I'm sorry but I didn't get the time to provide you a sample one. I'm continuing with 1.5.15 version. |
I'm facing the same issue. I solved it by following the workaround in this link spring-projects/spring-security#4467 |
I'm throwing a
CustomException
for every incorrect REST URL in my SpringBoot Application. ButDefaultErrorAttributes
is not getting executed after upgrading Spring Boot 1.5.4 to 2.0.4 release.Earlier I was using:
But Spring boot 2 has changed the above class to:
But after upgrading it is returning BLANK JSON Request. Though while debugging, I'm sure we are throwing
CDBaseException
.Below is my implementation of
DefaultErrorAttributes
defined as a Component.Below is my implementation of CustomException:
And here is how I'm throwing this Exception:
My only concern is, before upgrading SpringBoot it was working fine. But not working now. Am I doing anything wrong?
The text was updated successfully, but these errors were encountered: