Commit badc2665 by qwmqiuwenmin

fix

parent 65502010
......@@ -21,21 +21,21 @@ import java.util.regex.Pattern;
*
* @author hua
*/
//@ControllerAdvice
@ControllerAdvice
public class GlobalExceptionHandler extends WebBaseController {
private static Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
private static final Pattern pattern = Pattern.compile("(.*: )(.*)(\\n.*)");
@ResponseBody
@ExceptionHandler(ShowFrontMessageException.class)
public HaobanResponse ControllerException(HttpServletResponse response, ShowFrontMessageException ex) {
HaobanResponse res = new HaobanResponse();
res.setErrorCode(HaoBanErrCode.ERR_0.getCode());
res.setMessage(ex.getMessage());
return res;
}
// @ResponseBody
// @ExceptionHandler(ShowFrontMessageException.class)
// public HaobanResponse ControllerException(HttpServletResponse response, ShowFrontMessageException ex) {
// HaobanResponse res = new HaobanResponse();
// res.setErrorCode(HaoBanErrCode.ERR_0.getCode());
// res.setMessage(ex.getMessage());
// return res;
// }
@ResponseBody
......
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