From 185b233f3e89bcdd6f30e098a78b65c75a3ac448 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期三, 15 九月 2021 16:09:51 +0800
Subject: [PATCH] 优化代码
---
java110-utils/src/main/java/com/java110/utils/constant/CommonConstant.java | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/java110-utils/src/main/java/com/java110/utils/constant/CommonConstant.java b/java110-utils/src/main/java/com/java110/utils/constant/CommonConstant.java
old mode 100644
new mode 100755
index 8cd7b43..96a22d0
--- a/java110-utils/src/main/java/com/java110/utils/constant/CommonConstant.java
+++ b/java110-utils/src/main/java/com/java110/utils/constant/CommonConstant.java
@@ -1,5 +1,7 @@
package com.java110.utils.constant;
+import org.springframework.http.HttpMethod;
+
/**
* 鍏叡甯搁噺瀹氫箟
* Created by wuxw on 2016/12/28.
@@ -119,6 +121,23 @@
/**
* 鏄犲皠 缂撳瓨甯搁噺
*/
+ public final static String CACHE_PRIVILEGE = "PRIVILEGE";
+
+ /**
+ * 鏄犲皠 databus
+ */
+ public final static String CACHE_DATABUS = "DATABUS";
+
+ /**
+ * 鏄犲皠 databus
+ */
+ public final static String CACHE_BUSINESS_TABLE_HIS = "BUSINESS_TABLE_HIS";
+
+
+
+ /**
+ * 鏄犲皠 缂撳瓨甯搁噺
+ */
public final static String CACHE_SERVICE_SQL = "SERVICE_SQL";
@@ -148,6 +167,7 @@
public final static String HTTP_METHOD = "METHOD";
public final static String HTTP_APP_ID = "app_id";
public final static String HTTP_TRANSACTION_ID = "transaction_id";
+ public final static String HTTP_SRC_IP = "IP";
public final static String HTTP_REQ_TIME = "req_time";
public final static String HTTP_RES_TIME = "res_time";
@@ -192,4 +212,17 @@
+ public static String getHttpMethodStr(HttpMethod httpMethod) {
+ if (HttpMethod.GET == httpMethod) {
+ return HTTP_METHOD_GET;
+ } else if (HttpMethod.POST == httpMethod) {
+ return HTTP_METHOD_POST;
+ } else if (HttpMethod.PUT == httpMethod) {
+ return HTTP_METHOD_PUT;
+ } else if (HttpMethod.DELETE == httpMethod) {
+ return HTTP_METHOD_DELETE;
+ } else {
+ return HTTP_METHOD_POST;
+ }
+ }
}
--
Gitblit v1.8.0