package com.ssyf.common.web.helper;

import cn.hutool.extra.servlet.ServletUtil;
import com.ssyf.common.web.filter.RequestContext;
import com.ssyf.common.web.filter.RequestContextHolder;

/**
 *
 * @author huwei
 * @date 2023/8/10 22:36
 */
public class RequestContextHelper {

    public static RequestContext getContext(){
        return RequestContextHolder.getContext();
    }

    /**
     * 获取客户端ip地址
     * @return
     */
    public static String getClientIp() {
        return ServletUtil.getClientIP(getContext().getRequest());
    }
}
