java110
2021-09-12 3ed2627f7c05e8eaa4559371f9d6d2cb71aa4275
java110-utils/src/main/java/com/java110/utils/constant/CommonConstant.java
old mode 100644 new mode 100755
@@ -1,5 +1,7 @@
package com.java110.utils.constant;
import org.springframework.http.HttpMethod;
/**
 * 公共常量定义
 * Created by wuxw on 2016/12/28.
@@ -119,6 +121,18 @@
    /**
     * 映射 缓存常量
     */
    public final static String CACHE_PRIVILEGE = "PRIVILEGE";
    /**
     * 映射 databus
     */
    public final static String CACHE_DATABUS = "DATABUS";
    /**
     * 映射 缓存常量
     */
    public final static String CACHE_SERVICE_SQL = "SERVICE_SQL";
@@ -148,6 +162,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 +207,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;
        }
    }
}