📅  最后修改于: 2022-03-11 14:52:03.690000             🧑  作者: Mango
@Component
public class AppExceptionResolver extends AbstractHandlerExceptionResolver
{
private static final Logger logger = LoggerFactory.getLogger(AppExceptionResolver.class.getSimpleName());
@Override
protected ModelAndView doResolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
{
logger.error("Application error in: [" + ex.getClass().getName() + "]", ex);
return null;
}
}