新增监控接口

This commit is contained in:
沈健
2021-06-07 13:43:20 +08:00
parent 560bde3f78
commit ab4bbbffcd
3 changed files with 36 additions and 5 deletions
@@ -0,0 +1,28 @@
package com.fangjia.bkoff.controllers;
/**
* 房价网后台存活监控
*
* @author shenjian
* @since 2021/6/7
*/
public class K8sController {
/**
* 存活检查
*
* @return
*/
public Object livenessAction() {
return "liveness";
}
/**
* 就绪检查
*
* @return
*/
public Object readinessAction() {
return "readiness";
}
}
@@ -40,7 +40,8 @@ public class AuthInterceptor implements Interceptor {
request.setAttribute("__resources", request.getSession().getAttribute(userId + "_resources"));
if (invocation.getAction().getController().getName().equals("login")
|| invocation.getAction().getController().getName().equals("")) {
|| invocation.getAction().getController().getName().equals("")
|| invocation.getAction().getController().getName().equals("k8s")) {
return invocation.invoke();
}