标签:HandlerExceptionResolver

SpringMVC HandlerExceptionResolver返回json数据

发表于1年前(May 26, 2017 9:21:00 PM)  阅读 1289  评论 0

分类: Java

标签: HandlerExceptionResolver springmvc resolveException json MappingJackson2JsonView

HandlerExceptionResolver是SpringMVC提供的全局异常处理接口。

public interface HandlerExceptionResolver {

	/**
	 * Try to resolve the given exception that got thrown during handler execution,
	 * returning a {@link ModelAndView} that represents a specific error page if appropriate.
	 * <p>The returned {@code ModelAndView} may be {@linkplain ModelAndView#isEmpty() empty}
	 * to indicate that the exception has been resolved successfully but that no view
......