创建一个类实现Filter,加上@WebFilter注解,filterName是接口的唯一标识,urlPatterns是需要过滤的请求URL 需要在启动类添加ServeltComponentScan来扫描@WebFilter