首页>代码>ssm+mysql开发企业调味品进销存支持管理系统>/CondimentMIS/src/com/design/base/filter/GetMethodConvertingFilter.java
package com.design.base.filter;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;

public class GetMethodConvertingFilter implements Filter {

    @Override
    public void destroy() {
        // TODO Auto-generated method stub

    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
            throws IOException, ServletException {
        chain.doFilter(wrapRequest((HttpServletRequest) request), response);
    }

    @Override
    public void init(FilterConfig arg0) throws ServletException {

    }
    private static HttpServletRequestWrapper wrapRequest(HttpServletRequest request) {
        return new HttpServletRequestWrapper(request) {
            @Override
            public String getMethod() {
                return "GET";
            }
        };
    }

}
最近下载更多
微信网友_6602457430806528  LV6 2023年9月21日
sjl821120  LV6 2023年6月10日
qazwer11  LV5 2022年12月25日
184445428  LV6 2022年12月3日
小猿猿  LV6 2022年9月18日
591231555  LV20 2022年4月18日
叶子2022  LV1 2022年3月11日
扬帆起航  LV2 2022年3月3日
clf123456  LV12 2021年8月9日
xxxdragon  LV10 2021年6月29日
最近浏览更多
wlax99  LV12 2月17日
lz88888  LV12 2024年10月17日
Zyy19820821  LV2 2024年9月16日
lingtiejing  LV15 2024年6月28日
sunlea  LV20 2024年6月23日
gejun666  LV1 2024年6月18日
lilitu  LV6 2024年5月29日
李俊雄  LV3 2024年5月8日
WaZiN7  LV6 2024年4月25日
1134116035 2024年2月28日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友