spring-framework / org.springframework.web.servlet.handler / SimpleMappingExceptionResolver / setStatusCodes

setStatusCodes

open fun setStatusCodes(statusCodes: Properties): Unit

Set the HTTP status code that this exception resolver will apply for a given resolved error view. Keys are view names; values are status codes.

Note that this error code will only get applied in case of a top-level request. It will not be set for an include request, since the HTTP status cannot be modified from within an include.

If not specified, the default status code will be applied.

See Also
#setDefaultStatusCode(int)