1、错误异常界面国际化;2、服务请求异常国际化;3、文件样例界面样式修改。
This commit is contained in:
@@ -5,7 +5,7 @@ response.setStatus(400);
|
||||
Throwable ex = Exceptions.getThrowable(request);
|
||||
|
||||
// 编译错误信息
|
||||
StringBuilder sb = new StringBuilder("(400)错误信息:\n");
|
||||
StringBuilder sb = new StringBuilder("(400)<spring:message code=\"exception_info\"/>:\n");
|
||||
if (ex != null) {
|
||||
if (ex instanceof BindException) {
|
||||
for (ObjectError e : ((BindException)ex).getGlobalErrors()){
|
||||
@@ -24,7 +24,7 @@ if (ex != null) {
|
||||
sb.append("☆" + ex.getMessage());
|
||||
}
|
||||
} else {
|
||||
sb.append("未知错误.\n\n");
|
||||
sb.append("<spring:message code=\"unkown_error\"/>.\n\n");
|
||||
}
|
||||
|
||||
// 如果是异步请求或是手机端,则直接返回信息
|
||||
@@ -47,16 +47,16 @@ else {
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>400 - 请求出错</title>
|
||||
<title>400 - <spring:message code="request_error"/></title>
|
||||
<%@include file="/WEB-INF/include/header.jsp" %>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="page-header"><h1>参数有误,服务器无法解析.</h1></div>
|
||||
<div class="page-header"><h1><spring:message code="param_error"/><!-- 参数有误,服务器无法解析. --></h1></div>
|
||||
<div class="errorMessage">
|
||||
<%=StringUtils.toHtml(sb.toString())%> <br/>
|
||||
</div>
|
||||
<a href="javascript:" onclick="history.go(-1);" class="btn">返回上一页</a>
|
||||
<a href="javascript:" onclick="history.go(-1);" class="btn"><spring:message code="return_lastpage"/></a>
|
||||
<br/> <br/>
|
||||
<script>try{top.$.jBox.closeTip();}catch(e){}</script>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user