springboot之拦截器 和过滤器

一、定义一个拦截器: 自定义拦截器需要继承HandlerInterceptorAdapter或者实现HandlerInterceptor 二、定义一个过滤器: @WebFilter(filterName="encoderFilter",urlPatterns="/*")通过此注解实现对满足条件的请求进行过滤 三、定义启动类: 启动类中要加上@ServletComponentScan 时,Servl
相关文章
相关标签/搜索