Code examples for org.springframework.web.bind.annotation.ResponseStatus

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
	 * @return a corresponding ModelAndView to forward to, or {@code null} for default processing 
	protected ModelAndView resolveResponseStatus(ResponseStatus responseStatus, HttpServletRequest request, 
			HttpServletResponse response, Object handler, Exception ex) throws Exception { 
		int statusCode = responseStatus.value().value(); 
		String reason = responseStatus.reason(); 
		if (this.messageSource != null) { 
			reason = this.messageSource.getMessage(reason, null, reason, LocaleContextHolder.getLocale()); 
		if (!StringUtils.hasLength(reason)) { 
		else { 
			response.sendError(statusCode, reason); 
		return new ModelAndView(); 
Full Snippet Info