使用@WebFilter 踩雷 使用WebFilter时, url匹配所有请求 解决方法 检查filter类是否有@Component注解,如果有,则将其去掉 确保 springboot程序入口类拥有@ServletComponentScan注解, 如此即可解决url匹配所有请求的问题。