提交 be118512 编写于 作者: L lepdou

Merge pull request #249 from lepdou/adminservicecache

细节优化
......@@ -33,7 +33,7 @@ public class ServiceLocator {
private static final int RETRY_TIMES = 3;
private static final int CALL_META_SERVER_THRESHOLD = 10;
private static final int CALL_META_SERVER_THRESHOLD = 2;
private static final String ADMIN_SERVICE_URL_PATH = "/services/admin";
......@@ -91,6 +91,8 @@ public class ServiceLocator {
logger.warn(String.format("can not get %s admin service address at %d time", env, i));
}
}
//clear cache
serviceAddressCache.remove(env);
logger.error(String.format("can not get %s admin service address", env));
throw new ServiceException("No available admin service");
}
......
......@@ -611,6 +611,8 @@
<script type="application/javascript" src="scripts/services/EnvService.js"></script>
<script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="scripts/services/ConfigService.js"></script>
<script type="application/javascript" src="scripts/AppUtils.js"></script>
<!--directive-->
......
......@@ -6,7 +6,8 @@
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css">
<link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
<link href="//cdn.bootcss.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" media='all' href="vendor/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="styles/common-style.css">
<title>apollo</title>
</head>
......
......@@ -2,6 +2,9 @@ appUtil.service('AppUtil', ['toastr', function (toastr) {
return {
errorMsg: function (response) {
if (response.status == -1) {
return "您的登录信息已过期,请重新登录";
}
var msg = "Code:" + response.status;
if (response.data.message != null) {
msg += " Msg:" + response.data.message;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册