Commit 3e90dd3b authored by Quxl's avatar Quxl

x

parent a27a6698
...@@ -24,7 +24,6 @@ public class ExceptionHandler implements HandlerExceptionResolver { ...@@ -24,7 +24,6 @@ public class ExceptionHandler implements HandlerExceptionResolver {
@Override @Override
public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) { public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
boolean displayInLog = true; boolean displayInLog = true;
logService.saveErrorLog(ex);
ModelAndView mav = new ModelAndView(new MappingJackson2JsonView()); ModelAndView mav = new ModelAndView(new MappingJackson2JsonView());
try { try {
response.setContentType("application/json"); response.setContentType("application/json");
...@@ -43,6 +42,7 @@ public class ExceptionHandler implements HandlerExceptionResolver { ...@@ -43,6 +42,7 @@ public class ExceptionHandler implements HandlerExceptionResolver {
} finally { } finally {
if(displayInLog) { if(displayInLog) {
logger.error("", ex); logger.error("", ex);
logService.saveErrorLog(ex);
} }
} }
return mav; return mav;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment