| | |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.web.servlet.ServletComponentScan; |
| | | import org.springframework.web.servlet.config.annotation.EnableWebMvc; |
| | | |
| | | @SpringBootApplication |
| | | @ServletComponentScan(basePackages = {"com.whyc.filter"}) |
| | | @EnableWebMvc |
| | | @ServletComponentScan |
| | | public class EnvirMonitorSysApplication { |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | resp.setStatus(202); |
| | | return; |
| | | } |
| | | HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper((HttpServletRequest)req); |
| | | /*HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper((HttpServletRequest)req); |
| | | if(servletPath.equals("/index.html") && req.getParameter("n") == null) { |
| | | RequestDispatcher dispatcher = wrapper.getRequestDispatcher("/"); |
| | | dispatcher.forward(request, resp); |
| | | return; |
| | | } |
| | | }*/ |
| | | } |
| | | |
| | | chain.doFilter(request, resp); |