1. 只使用@WebFilte:過濾器不生效 WebFilter屬于注解屬于Servlet3+,與Spring本身沒有什么關(guān)系,所以Spring默認(rèn)是不認(rèn)識這個注解的。 2. @WebFilter+@Component:配置的過濾條件不生效 同上,Spring是不認(rèn)識@WebFilter注解的,所以注解配置的任何屬性都無意義(例如:指定過濾的url)。 該種方式其實(shí)就等同于只加了個@Compo...
www.dbjr.com.cn/program/299240u...htm 2025-5-17