无法在dofilter方法中获得适当的响应?

时间:2018-03-21 04:57:46

标签: java spring spring-boot servlets servlet-filters

我在spring boot应用程序中定义了servlet过滤器实现。所有电话我只能获得200响应。如何在dofilter方法中得到适当的响应?

 public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
            throws IOException, ServletException {
        doFilterFunction.requestFunction(request, response, chain);
    }


    public void requestFunction(ServletRequest request, ServletResponse response, FilterChain chain,String x_internal_key, String session, String user, String urlPat) throws IOException, ServletException {
                    chain.doFilter(request, response);
}

1 个答案:

答案 0 :(得分:0)

我已经删除了try catch块以从servlet获取整个响应。它工作正常。