日期:2014-05-16 浏览次数:20513 次
if(accept.indexOf("application/json")>-1){
return super.getModelAndView("errors/ajax/500", ex, request);
}
<%@ page language="java" contentType="application/json; charset=UTF-8" pageEncoding="UTF-8"%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>{"errorCode":-1,"errorMsg":"${exception.message}"}
{"errorCode":"-1","errorMsg":"错误代码:-20002
错误信息:ORA-20002: 3103: 项目 CUXECSWF/10888CUXECSWF120518150833 的属性 WF_NOTE 不存在。"}
Map<String,String> errors = new HashMap<String,String>();
errors.put("errorCode", "-1");
errors.put("errorMsg", ex.getMessage());
log.info(JSONObject.fromObject(errors).toString())
{"errorCode":"-1","errorMsg":"错误代码:-20002\r
错误信息:ORA-20002: 3103: 项目 CUXECSWF/10888CUXECSWF120518150833 的属性 WF_NOTE 不存在。"}
Map<String,String> errors = new HashMap<String,String>();
errors.put("errorCode", "-1");
errors.put("errorMsg", ex.getMessage());
request.setAttribute("errorJson", JSONObject.fromObject(errors).toString());
return super.getModelAndView("errors/ajax/500", ex, request);
<%@ page language="java" contentType="application/json; charset=UTF-8" pageEncoding="UTF-8"%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>${errorJson}