How to request complete query string in Spring MVC?

前端 未结 4 1821
感情败类
感情败类 2021-01-11 17:33

In Spring MVC, I can do this to get a value of items on the query string:

    public void sendMessage(HttpServletResponse response,
                                  


        
4条回答
  •  无人及你
    2021-01-11 18:17

    Add the HttpServletRequest as argument to the method, and get the query string from the request:

    public void sendMessage(HttpServletRequest request,
                            HttpServletResponse response {
        String queryString = request.getQueryString();
    }
    

提交回复
热议问题