BootMvcConfigurerAdapter.java 文件源码

java
阅读 43 收藏 0 点赞 0 评论 0

项目:onetwo 作者:
@Override
    public void addInterceptors(InterceptorRegistry registry) {
        /*Optional.ofNullable(interceptorList).ifPresent(list->{
            list.stream().forEach(inter->registry.addInterceptor(inter));
        });*/
        if(LangUtils.isEmpty(interceptorList)){
            return ;
        }
        for(HandlerInterceptor inter : interceptorList){
            InterceptorRegistration reg = registry.addInterceptor(inter);
            if(inter instanceof WebInterceptorAdapter){
                WebInterceptorAdapter webinter = (WebInterceptorAdapter) inter;
                if(LangUtils.isEmpty(webinter.getPathPatterns())){
                    continue;
                }
                reg.addPathPatterns(webinter.getPathPatterns());
            }
        }
//      registry.addInterceptor(new BootFirstInterceptor());
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号