@@ -0,0 +1,955 @@
+package com.s4game.oa.manager.web;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport org.springframework.web.bind.annotation.ControllerAdvice;%0Aimport org.springframework.web.bind.annotation.ExceptionHandler;%0Aimport org.springframework.web.bind.annotation.ResponseBody;%0A%0Aimport com.s4game.oa.common.response.Response;%0A%0A/**%0A * @author zeusgooogle@gmail.com%0A * @sine 20167%E5%B9%B45%E6%9C%8813%E6%97%A5 %E4%B8%8A%E5%8D%884:30:16%0A */%0A@ControllerAdvice%0Apublic class DefaultExceptionHandler %7B%0A%0A%09private Logger LOG = LoggerFactory.getLogger(getClass());%0A%0A%09@ExceptionHandler(Exception.class)%0A%09@ResponseBody%0A%09public Response%3CString%3E resolveException(HttpServletRequest request, HttpServletResponse response, Exception ex) %7B%0A%09%09Response%3CString%3E result = new Response%3C%3E();%0A%09%09result.setErrorCode(-1);%0A%09%09result.setMsg(ex.getMessage());%0A%0A%09%09LOG.error(%22manager exception.%22, ex);%0A%0A%09%09return result;%0A%09%7D%0A%0A%7D%0A

add global exception