WebFilter 在springBoot工程中不起作用

【1】@ServletComponentScan
必须有一个注解将带有@WebFilter的类包含进去。

【2】自定义
FiltersConfig extends WebMvcConfigurerAdapter
FiltersConfig 之上加 @Configuration 注解


原文地址:https://www.cnblogs.com/daixianjun/p/webFilter.html