All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.yt.web.utils.WebUtils Maven / Gradle / Ivy

package com.github.yt.web.utils;


import javax.servlet.http.HttpServletRequest;

public class WebUtils extends org.springframework.web.util.WebUtils {

    /**
     * 获取url和request参数
     */
    public static String getParameterValues(HttpServletRequest request) {
        Object pathVariables = request.getAttribute("org.springframework.web.servlet.View.pathVariables");
        String parameterValues = org.springframework.web.util.WebUtils.getParametersStartingWith(request, null).toString();
        if (pathVariables == null) {
            pathVariables = "{}";
        }
        return "parameterValues:" + parameterValues + ",pathVariables:" + pathVariables;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy