We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Nick Padgett opened SPR-5953 and commented
It would be nice if SimpleMappingExceptionResolver had the ability to resolve HTTP status codes as well. Currently, I have the following class:
public class StatusCodeMappingExceptionResolver extends SimpleMappingExceptionResolver { private Map<String, Integer> statusCodeMappings; @Override protected Integer determineStatusCode(final HttpServletRequest request, final String viewName) { Integer statusCode = null; // Check for specific status code mappings. if (null != this.statusCodeMappings) { statusCode = this.statusCodeMappings.get(viewName); } // Return default status code else, if defined. if (null == statusCode) { statusCode = super.determineStatusCode(request, viewName); } return statusCode; } public void setStatusCodeMappings(Map<String, Integer> statusCodeMappings) { this.statusCodeMappings = statusCodeMappings; } }
Referenced from: commits 12e43ff
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered:
Arjen Poutsma commented
Fixed.
Sorry, something went wrong.
poutsma
No branches or pull requests
Nick Padgett opened SPR-5953 and commented
It would be nice if SimpleMappingExceptionResolver had the ability to resolve HTTP status codes as well. Currently, I have the following class:
Referenced from: commits 12e43ff
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered: